There's a way to "paint" to an SVG file using QSvgGenerator class (link). Is there a way to generate PDF files, or do I have to convert from SVG to PDF using an external program.
There's a way to "paint" to an SVG file using QSvgGenerator class (link). Is there a way to generate PDF files, or do I have to convert from SVG to PDF using an external program.
You can use QPrinter::PdfFormat:
Qt Code:
QPrinter printer; printer.setOutputFileName("filename.pdf"); renderer.render(&painter); painter.end();To copy to clipboard, switch view to plain text mode
J-P Nurmi
You can use QPrinter to generate pdf :
Qt Code:
QPrinter printer; printer.setOutputFileName("My Report.pdf");To copy to clipboard, switch view to plain text mode
P.S : Have a look at the attached file ; it's a small application that generates & print PDF .
Hope to be Helpful .
I tried to use your application but it does not send a pdf file to printer. It only treats text file and not binary file..Am I right? Or am i missing something?
Thank you
Bookmarks