Take the following MWE LaTeX source file: \documentclass{article} \usepackage{amsmath} \pagestyle{empty} \begin{document} \begin{equation*} \frac{dN}{dt}=rN\left(1-\frac{N}{K}\right) \end{equation*} \end{document} The equation has both left and right parentheses. However, when running through a series of commands to generate a .png image of the equation, GS 9.27 fails to render the right-most parenthesis. I confirm that current GS is the problem because if I roll back to (say) GS 9.22, no problem. Here is the sequence of commands that generate the problem: 1\ generate PDF from MWE.tex file "pdflatex" -shell-escape -interaction=batchmode "mwe.tex" --> generates the .pdf files as expected, looking as it should. 2\ get bounding box for equation (I want image for equation only) cmd /C "C:\Program Files\gs\gs9.xx\bin\gswin64c.exe" -q -dBATCH -dNOPAUSE -sDEVICE=bbox mwe.pdf 2> mwe.bbx --> this step works perfectly 3\ "C:\Program Files\gs\gs9.xx\bin\gswin64c.exe" -q -dBATCH -dNOPAUSE -sDEVICE=pngalpha -r1200 -sOutputFile="mwe_tmp.png" -g1426x397 -c "<</Install {-262.379101 -632.411981 translate}>> setpagedevice" -f "c:\temp\mwe.pdf" --> this is the step that fails, if I use gs9.27. The .pnf file generate is missing the right-most parenthesis. If I use gs9.22, works fine. 9.27 fails. Not sure where between 9.22 -> 9.27 things 'break', but something is definitely broken.
Created attachment 17310 [details] MWE The MWE referred to in bug report.
Created attachment 17311 [details] .bat file executing GS commands... /bat file to execute commands to generate bbox for equation in MWE.
Just rolled back through gs9.27 -> 9.25. The bug emerges between gs9.26 and gs9.27. Here are the bbox numbers for 9.25 %%BoundingBox: 262 632 348 657 %%HiResBoundingBox: 262.379101 632.411981 347.957989 656.243980 9.26 %%BoundingBox: 262 632 348 657 %%HiResBoundingBox: 262.379101 632.411981 347.957989 656.243980 9.27 %%BoundingBox: 258 629 343 676 %%HiResBoundingBox: 258.047992 629.171981 342.431990 675.539979 So, you can se the way gs9.27 is handling/calculating the bbox is different 9broken), relative to earlier releases. I'm only seeing this for a simple problem, but my guess is this ha all sorts of ramifications for other things using pdflatex.
Please attach a Postscript or PDF file that illustrates the problem.
Tis clearly isn't anythign to do with images. Most likely its a change in the bbox device but I'll categorise it as PDF interpreter for now.
Created attachment 17313 [details] PDF of MWE As requested - PDF of the MWE as described in original report.
Created attachment 17314 [details] PNG file using bbox generatred using gs9.27 PNG showing right-truncation of equaition, because bbox generated by 9.27 is 'shifted left (and up, although it doesn't show the latter here), relative to 9.26, 9.25,...
Created attachment 17315 [details] DVI from MWE If instead of pdflatex, I use latex - DVI, I generate the attached .dvi file. If I then use "dvipng" -q -D 1200 -T tight -bg Transparent -o "mwe_latex-dvi.png" "mwe_latex-dvi.dvi" the PNG file is generated perfectly. Problem only arises is someone is using pdflatex -- and gs9.26 -- to get there from here. pdflatex works fine with all earlier versions of gs (that I tried, at least).
I'm afraid bisecting reveals this infamous commit as the source of the problem: http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=355434f4b1bbe8c4f98cafad5a6868aa2f0eaae1
(In reply to evan.cooch from comment #8) > Created attachment 17315 [details] > DVI from MWE > > If instead of pdflatex, I use latex - DVI, I generate the attached .dvi > file. If I then use > > "dvipng" -q -D 1200 -T tight -bg Transparent -o "mwe_latex-dvi.png" > "mwe_latex-dvi.dvi" > > the PNG file is generated perfectly. Problem only arises is someone is using > pdflatex -- and gs9.26 -- to get there from here. pdflatex works fine with > all earlier versions of gs (that I tried, at least). I meant.. "Problem only arises is someone is using pdflatex -- and gs9.27 -- to get there from here. pdflatex works fine with all earlier versions of gs (that I tried, at least)." gs9.26 works fine regardless of how the .PDF is compiled (latex or pdflatex).
*** This bug has been marked as a duplicate of bug 700952 ***