https://bugs.kde.org/show_bug.cgi?id=422095

--- Comment #5 from Kevin Kofler <kevin.kof...@chello.at> ---
Printing to a real printer still sends a bitmap to the printer. As I wrote:

> For output to a physical printer, the only way to avoid the rasterization is 
> to use the FilePrinter class from Okular though. Falkon used to do that (I 
> had submitted that code back when the QtWebEngine did not have the print 
> method at all, only printToPdf), but switched to using the print method for 
> physical printers.

What QtWebEngine cannot do is print directly to a QPrinter. The Chromium code
can only output PDFs. Then you have to get that PDF to the printer somehow. How
QtWebEngine does it is that it renders the PDF to a pixmap using the PDFium
library that happens to be bundled with Chromium and then sends that pixmap to
the printer. How Okular prints PDFs (and how Falkon used to do it at the
beginning) is that it runs the lpr CLI command to send the PDF to the printer.
The main difficulty with that is that you have to translate settings such as
margins or page orientation or they will just get ignored, and that it also
only works with printers that lpr knows about (e.g., you cannot print to PDF
with that approach).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to