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

Qt writes PostScript files with PS-Adobe-1.0 at the start of the header, preventing bounding boxes for EPS files from working in some viewed (eg. Mac OS X Preview)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.6.3
    • 4.6.2
    • GUI: Printing
    • None
    • macOS
    • b5b096996de656dc44723b02826d892291173797

      The attached program (in eps-version-bug.zip) renders a 40x40 black square in an EPS file, setting the paper size to 50x50. The resulting file should therefore render as a black box with a 5 pixel white border when opened in a preview application. However, the first line of the exported EPS file is

      %!PS-Adobe-1.0 EPSF-3.0

      and the "PS-Adobe-1.0" part of this prevents previewers, notably Mac OS X Preview, from rendering the file with the correct bounding box.

      Since Qt's PostScript support embeds graphics, fonts and so on, I think this is simply wrong and should read

      %!PS-Adobe-3.0 EPSF-3.0

      to use the more modern standard. This is hard coded in QPSPrintEnginePrivate::emitHeader in the qprintengine_ps.cpp file - see attached patch.

        1. eps-version.patch
          0.9 kB
        2. eps-version-bug.zip
          0.7 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kjernase Trond Kjernåsen (Inactive)
            jlarcombe James Larcombe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes