- Daniel Vivier
- PowerBuilder
- Thursday, 21 April 2022 05:56 PM UTC
We want to use the WebBrowser control in PB2021 to load HTML files and save them as PDF. We have working code, but it is adding a header and footer to the page. We need to not have those!
Is there a way to force that? Maybe some JavaScript?
I have actually found a bunch of posts online with suggested CSS to put in an @media print { ... } section to control this, but they only work for single-page documents, because they set the @page margins to 0 (which prevents the header and footer from printing) and then set margins on the body. Unfortunately those margins on the body only apply to the top of the first page and the bottom of the last page, which is not good!
Thanks.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.