Bug 524250 - ghostscript does not preserve page size and margins with PDF to PS conversion
Summary: ghostscript does not preserve page size and margins with PDF to PS conversion
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ghostscript
Version: 5.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Tim Waugh
QA Contact: QE Internationalization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 592962
TreeView+ depends on / blocked
 
Reported: 2009-09-18 14:30 UTC by Olivier Fourdan
Modified: 2018-11-14 19:38 UTC (History)
8 users (show)

Fixed In Version: ghostscript-8.15.2-9.12.el5
Doc Type: Bug Fix
Doc Text:
Due to the incorrect page size handling, converting a PDF file to PostScript may have caused the correct page size information to be lost. As a result, the printed output may have been misplaced or partially visible only. With this update, the conversion from PDF to PostScript works as expected.
Clone Of:
Environment:
Last Closed: 2011-01-13 22:06:26 UTC


Attachments (Terms of Use)
Proposd patch (535 bytes, patch)
2009-09-18 14:31 UTC, Olivier Fourdan
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0137 normal SHIPPED_LIVE ghostscript bug fix and enhancement update 2011-01-12 19:26:44 UTC

Description Olivier Fourdan 2009-09-18 14:30:20 UTC
Description of problem:

Customer is printing PDF labels on a Zebra printer.

The labels have a specific size, that gets lost during the format conversion before printing.

Version-Release number of selected component (if applicable):

ghostscript-8.15.2-9.4

How reproducible:

100% reproducible

Steps to Reproduce:
1. Print the file attached
2. Compare the output with current ghostcript
  
Actual results:

The resulting printing is misplaced and partially visible on the page

Expected results:

The output is printed on the page

Additional info:

This problem does not happen with recent versions of ghostscript.

ghostscript-8.15.2-9.4.el5

  DEBUG2: PageSize = [ 612.000 792.000 ]
  [...]
  DEBUG: Updating PageSize to [612 792]...
  DEBUG2: PageSize = [ 612.000 792.000 ]
  [...]
  DEBUG: Updating PageSize to [612 792]...
  DEBUG2: PageSize = [ 612.000 792.000 ]
  [...]
  DEBUG: PageSize = [ 612 792 ], HWResolution = [ 100 100 ]

ghostscript-8.62:

  DEBUG2: PageSize = [ 612.000 792.000 ]
  [...]
  DEBUG: Updating PageSize to [612 792]...
  [...]
  DEBUG: Updating PageSize to [292 414]...
  DEBUG2: PageSize = [ 292.000 414.000 ]
  [...]
  DEBUG2: PageSize = [ 292.000 414.000 ]
  DEBUG: PageSize = [ 292 414 ], HWResolution = [ 100 100 ]
  DEBUG2: PageSize = [ 292.000 414.000 ]

Note the difference, with gs-8.62 the Pagesize is correct whereas on gs-8.15 the page set is reset to Letter.

This is due to this line in espgs-8.15.2/lib/gs_setpd.ps:

 % Ignore MediaPostition when merging (Adobe CPSI does).
 /MediaPosition { dup //null ne { pop //null } if } bind

It is not present in ghostscript-8.62 and removing gives the expected page size.

Patch attached. Customer confirmed the fix with a test package.

Comment 1 Olivier Fourdan 2009-09-18 14:31:08 UTC
Created attachment 361670 [details]
Proposd patch

Comment 6 RHEL Product and Program Management 2009-11-06 18:48:00 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 13 Jaromir Hradilek 2010-07-20 09:56:44 UTC
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
Due to the incorrect page size handling, converting a PDF file to PostScript may have caused the correct page size information to be lost. As a result, the printed output may have been misplaced or partially visible only. With this update, the conversion from PDF to PostScript works as expected.

Comment 17 errata-xmlrpc 2011-01-13 22:06:26 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0137.html


Note You need to log in before you can comment on or make changes to this bug.