QPaintEngine *QPrinterProto::paintEngine() const { QPrinter *item = qscriptvalue_cast<QPrinter*>(thisObject()); if (item) return item->paintEngine(); return 0; }
void QgsComposition::beginPrintAsPDF( QPrinter& printer, const QString& file ) { printer.setOutputFormat( QPrinter::PdfFormat ); printer.setOutputFileName( file ); printer.setPaperSize( QSizeF( paperWidth(), paperHeight() ), QPrinter::Millimeter ); QgsPaintEngineHack::fixEngineFlags( printer.paintEngine() ); }