Bug 701073

Summary: Bounding box of PDF wrong
Product: Ghostscript Reporter: Arno <ahollosi>
Component: GeneralAssignee: Default assignee <ghostpdl-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: chris.liddell
Priority: P4    
Version: 9.27   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: PDF diagram with labels

Description Arno 2019-05-21 20:41:33 UTC
Created attachment 17504 [details]
PDF diagram with labels

Ghostscript is used by pdfcrop (https://www.ctan.org/pkg/pdfcrop) to determine the bounding box of a PDF file (attached). In Ghostscript 9.27 the bounding box is different from Ghostscript 9.26 which results in the labels of the diagram being cut off.

Ghostscript is called like:
> gs -sDEVICE=bbox -dNOPAUSE -dBATCH -f unnamed-chunk-2-1.pdf

Here's the relevant output from Ghostscript 9.26:

    %%BoundingBox: 4 15 439 300
    * Page 1: 4 15 439 300
    %%HiResBoundingBox: 4.212000 15.102000 438.135034 299.825991

... and here is the (quite different) output from Ghostscript 9.27:

    %%BoundingBox: 12 11 439 293
    * Page 1: 12 11 439 293
    %%HiResBoundingBox: 12.708000 11.412000 438.135034 292.031991

System information:
* Linux Debian 9+ (testing release)
* Debian package version for Ghostscript 9.26: 9.26a~dfsg-0+deb9u3
* Debian package version for Ghostscript 9.27: 9.27~dfsg-1
Comment 1 Chris Liddell (chrisl) 2019-05-22 07:44:51 UTC
The current code produces the same output as 9.26, so this is almost certainly a duplicate of bug #700952

*** This bug has been marked as a duplicate of bug 700952 ***