Skip to content


Remove outdated comment
Browse files Browse the repository at this point in the history
As tested by @3nids, QPrinter::PdfFormat works correctly on OSX
(as of Qt 5.11) and correctly respects "text as text" setting
without forcing conversion to paths.
  • Loading branch information
nyalldawson committed Dec 11, 2018
1 parent 4f9f5d1 commit 7f5441c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/core/layout/qgslayoutexporter.cpp
Expand Up @@ -1026,13 +1026,6 @@ QgsLayoutExporter::ExportResult QgsLayoutExporter::exportToSvg( QgsAbstractLayou
void QgsLayoutExporter::preparePrintAsPdf( QgsLayout *layout, QPrinter &printer, const QString &filePath )
printer.setOutputFileName( filePath );
// setOutputFormat MUST come after setOutputFileName, which auto-sets format to QPrinter::PdfFormat.

// [LS] This should be QPrinter::NativeFormat for Mac, otherwise fonts are not embed-able
// and text is not searchable; however, there are several bugs with <= Qt 4.8.5, 5.1.1, 5.2.0:
// - PDF font embedding fails
// - PDF output converts text to outline
// Also an issue with PDF paper size using QPrinter::NativeFormat on Mac (always outputs portrait letter-size)
printer.setOutputFormat( QPrinter::PdfFormat );

updatePrinterPageSize( layout, printer, firstPageToBeExported( layout ) );
Expand Down

0 comments on commit 7f5441c

Please sign in to comment.