> It seems that the Ghostscript generated PDF is broken > regardless of LilyPond or extractpdfmark. > > I tested Ghostscript GIT PRERELEASE at > commit 99b48f1992844e30ab4b05dbb2764ba99f7b66f4 > Date: Mon Feb 19 08:33:23 2024 +0000 > . > Here's results. > > ``` > $ cat test.ps > /NimbusSans-Regular findfont 14 scalefont setfont > 50 100 moveto > (Hello World) show > > $ ./gs -q -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=test.pdf test.ps > > $ qpdf --check test.pdf > checking test.pdf > PDF Version: 1.7 > File is not encrypted > WARNING: test.pdf: object 6/0: error reading object: integer out of range > converting 889058230272 from a 8-byte signed type to a 4-byte signed type > WARNING: test.pdf (object 9 0, offset 100): stream dictionary lacks /Length > key > WARNING: test.pdf (object 9 0, offset 146): attempting to recover stream > length > WARNING: test.pdf (object 9 0, offset 146): recovered stream length: 82 > File is not linearized > qpdf: operation succeeded with warnings > > $ > ```
Interesting. I cannot reproduce this failure: if I compile current ghostpdl 'master' (commit b809058c5ea0cc5689d8b7c15f191a440c9bb426), everything works fine; your example PS file compiles correctly, and 'qdf --check' (built from current git) passes, too. I'm on a GNU/Linux box in case this matters. Werner