Skip to content
Permalink
Browse files

Remove outdated comment

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 6, 2018
1 parent 4f9f5d1 commit 7f5441c95704165c261f6fe501ed16be2fda09de
Showing with 0 additions and 7 deletions.
  1. +0 −7 src/core/layout/qgslayoutexporter.cpp
@@ -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:
// https://bugreports.qt.io/browse/QTBUG-10094 - PDF font embedding fails
// https://bugreports.qt.io/browse/QTBUG-33583 - 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 ) );

0 comments on commit 7f5441c

Please sign in to comment.
You can’t perform that action at this time.