Bug 701161

Summary: Wrong BoundingBox calculation
Product: Ghostscript Reporter: david <davie0101>
Component: RegressionAssignee: Default assignee <ghostpdl-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P4    
Version: 9.27   
Hardware: Macintosh   
OS: MacOS X   
Customer: Word Size: ---
Attachments: test pdf
wrong trimmed pdf from 9.27
correct trimmed file from version 9.26

Description david 2019-06-03 22:06:29 UTC
Created attachment 17625 [details]
test pdf

Bounding box calculations are not correct in 9.27.

example: latex file (pdf also attached)
-----
\documentclass{article}

\begin{document}

\thispagestyle{empty}

\[
\left[\sum_k L_k g_{1,k} b_{1,k}^*\right]
\]

\end{document}
-----

bounding box calculation:

gs -sDEVICE=bbox -dNOPAUSE -dBATCH test.pdf

result (9.26):
%%BoundingBox: 272 616 339 647

clipping by:
gs -sDEVICE=pdfwrite \                     
   -o trimmedFile.pdf \
   -c "[/CropBox [272 616 339 647] /PAGES pdfmark" \
   -f test.pdf

returns expected pdf with the content;

in 9.27, bounding box is wrong:

%%BoundingBox: 264 612 336 671

clipping as before leaves some parts of the equation out.
Comment 1 david 2019-06-03 22:07:30 UTC
Created attachment 17626 [details]
wrong trimmed pdf from 9.27
Comment 2 david 2019-06-03 22:12:25 UTC
Created attachment 17627 [details]
correct trimmed file from version 9.26
Comment 3 Ken Sharp 2019-06-04 07:13:51 UTC

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