QWebEnginePage printToPdf footer
-
Hi,
I'm using QWebEnginePage whit setHtml et printToPdf to create a new PDF. I want to add page number like (page # of #) on each page. How can i do that ?
Thanks
M.C -
Hi,
Any update on this topic. I am also interested in adding a footer to the pdf. Can it be done?
Regards,
Manish -
Hi, I think what you need is QPdfWriter. You can manipulate rich text content using QTextDocument and associated classes - how to approach the subject is written here.
-
This is more of a
css
issue and actually it's very hard to achieve
https://stackoverflow.com/questions/15797161/browser-support-for-css-page-numbers -
Hi, I think what you need is QPdfWriter. You can manipulate rich text content using QTextDocument and associated classes - how to approach the subject is written here.
@artwaw thanks for the tip, looks like QTextDocument only supports a subset of html and css features. I did a quick sample using QPdfWriter & QTextDocument but it could not render the html file properly due to un-supported css tags.
-
This is more of a
css
issue and actually it's very hard to achieve
https://stackoverflow.com/questions/15797161/browser-support-for-css-page-numbers@MajidKamali Did you try this approach and had it worked? I tried page counters but could not get it working. Please let me know if you have any sample or example. Thanks!
-
Hi,
Any update on this topic. I am also interested in adding a footer to the pdf. Can it be done?
Regards,
Manish@manishsharma
https://bugreports.qt.io/browse/QTBUG-61032
? Not a solution, more a confirmation of lack of feature?