Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-21138

QPrintEngine on Mac doesn't set the correct mime type when the user attempts to save a postscript file via the OS print dialog

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P4: Low P4: Low
    • 4.8.x
    • 4.7.3
    • GUI: Printing
    • None
    • macOS

      To reproduce this, on Mac OS X create a QPrintDialog. When the dialog is displayed, select the PDF dropdown, then Save as PostScript...

      Whatever you put in here, the content of the file printed is a PDF. This is due to the format being hardwired in QMacPrintEngine::begin() - The call to PMSessionSetDestination uses a mime type of kPMDocumentFormatPDF.

      This can be remedied by retrieving and storing the correct mime type in the dialog code - in QPrintDialog_mac.mm printPanelDidEnd, after the code calling PMSessionCopyDestinationLocation (circa line 175), you can access the correct information using PMSessionCopyDestinationFormat and store it in the QMacPrintEnginePrivate class with the filename. This can then be passed into the PSSessionSetDestination call mentioned earlier.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Unassigned Unassigned
            stephen.penny@avid.com Stephen Penny
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes