Hide widget when printing page

Asked

Viewed 992 times

0

I have a product report page that converts it to pdf using wkhtmltopdf.

My problem is when generating the pdf I want to put a div with a banner at the end of category, if the category does not occupy the whole page. EX: report with 10 page on the tenth page the products occupied only half the page, so puts a banner.

If the products occupy the whole page do not show the banner. not even in the next.

  • You need to post at least some example of the code you are printing so that someone can give a solution to your case...

1 answer

2

I don’t know if the question is consistent with the title of the same, but in case you hide or treat elements in the print version you only need to deal with css.

Follow an example

/*CSS para impressão*/
@media print {
  .elemento{
  display: none;
  }
}
  • 1

    from what I understood from the title of the question, his answer is right, from the description, he wants something else, but he will also need this information.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.