After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301432 - New PDF files have large gap at top of image
New PDF files have large gap at top of image
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.2.x
Other All
: Normal normal
: 2.2
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-04-21 08:20 UTC by Phil Smith
Modified: 2008-01-15 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Phil Smith 2005-04-21 08:20:51 UTC
Please describe the problem:
Recent PDF files (with Digital Rights Applied) do not render properly in either
GIMP or ImageMagick.  I suspect this is in some common PDF library but do not
know which one.  These PDF files were probably created with the Nov. 2004 Update
3 of Adobe PDF, or possibly some expensive Adobe product.

Steps to reproduce:
1. Go to www.irs.gov website
2. Download any current 2004 PDF tax form (example: 2004 1040)
3. Open in GIMP. 

Actual results:
Observe large, incorrect margin at top of PDF.


Expected results:
Render correctly, as in Adobe Acrobat 7 beta for Linux.

Does this happen every time?
Yes

Other information:
I verified that older tax forms from 2002 and 2003 still work correctly,
therefore I assume it is the PDF creation software (Adobe) that has changed and
broken GIMP and ImageMagick.  These PDF files when opened in Adobe state "this
PDF has digital rights applied so you can save the filled in version even with
the free Adobe Reader".  Perhaps GIMP is rendering the digital rights section
instead of ignoring it.
Comment 1 Michael Schumacher 2005-04-21 09:25:27 UTC
GIMP uses ghostscript to render the PDF, you should try with this software.
AFAIK ImageMagick also uses ghostscript as the delegate for PDF (and Postscript,
btw):

http://www.cs.wisc.edu/~ghost/

Version 8.51 has been released on monday, maybe it behaves differently. Try to
convert PDF to an image format using ghostscript directly - if this is
successful and doesn't show the gap, reopen the bug.
Comment 2 Manish Singh 2005-04-21 10:44:57 UTC
This is actually a flaw in the PDF. It relies on implementation defined
behavior. Newer ghostscript versions can let us patch Acrobat Reader though.
Comment 3 Manish Singh 2005-04-21 10:48:20 UTC
Fixed in both branches.

2005-04-21  Manish Singh  <yosh@gimp.org>

        * plug-ins/common/postscript.c: pass -dUseCropBox when loading PDF
        files, to match Acrobat Reader's behavior in honoring CropBox over
        MediaBox. Fixes bug #301432.
Comment 4 Manish Singh 2005-04-21 10:53:19 UTC
One can also set -dUseCropBox in GS_OPTIONS in the environment, as a workaround
until a new version is released. You'll need ghostscript 8 or higher for this to
work though.