For applications that use other KHTMLView, it is not possible with the current implementation of KHTMLView::print() to support common print settings within an application, since a separate QPainter instance is used internally (see https://api.kde.org/frameworks/khtml/html/khtmlview_8cpp_source.html#l#l03128). OBSERVED RESULT When printing KHTMLView based pages, it is necessary to make necessary adjustments before each printout, which is not user friendly. EXPECTED RESULT Print settings should only need to be changed once in an application, even when multiple prints are used. SOFTWARE/OS VERSIONS All platforms ADDITIONAL INFORMATION KHTMLView::print() would have to be extended to use a predefined QPrinter instance.
For a related reqiew request see https://phabricator.kde.org/D19504
Git commit 2d8cba0507291991c2421963ff23fbba65604e43 by Ralf Habacker. Committed on 21/10/2019 at 19:12. Pushed by habacker into branch 'master'. Extend KHtmlView::print() to use a predefined QPrinter instance This is required to share printer settings inside an application. FIXED-IN:5.64.0 Test Plan: compile on linux Reviewed By: dfaure Differential Revision: https://phabricator.kde.org/D19504 M +7 -1 src/khtmlview.cpp M +10 -0 src/khtmlview.h https://commits.kde.org/khtml/2d8cba0507291991c2421963ff23fbba65604e43