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.