PDA

View Full Version : Print files with Qt



Qiieha
28th April 2011, 16:38
Hi!
I want to print pdf files, which are saved local via my Qt console programm.
Does anybody knows how this works.
On google I found thinks about how to print a QTextDocument and so on, but I want to print normal files, without opening and without a printDialog.

Thank u for your help

wysota
28th April 2011, 16:46
The easiest way to print a custom file on Unix is to send it to CUPS (e.g. using lpr) and hope it can handle the file type. Other than that, for pdf files you can either convert them to postscript and then send them to the printer or rasterize them using for instance poppler and send them to printer using QPrinter.

Qiieha
28th April 2011, 16:56
Thank you for your fast reply. I think I choose the Unix command lpr.