[luatex] subtle bug in generating PDF outlines
luigi scarso
luigi.scarso at gmail.com
Sun Jan 5 16:43:25 CET 2025
On Sun, 5 Jan 2025 at 06:52, Werner LEMBERG <wl at gnu.org> wrote:
>
> >> Alas, I don't know how to create a small input file that you can
> >> actually use as a test – unfortunately, the creation process of the
> >> LilyPond's Texinfo documentation is extremely complicated, making
> >> simplifications a nightmare.
> >
> > Ok I am checking it now.
>
> Thanks. I can build luatex and test changes if necessary.
>
>
Still checking...
At the moment I have
GPL Ghostscript 10.04.0 (2024-09-18)
build from source with
make debug
I run the test with
gs -dPDFDEBUG -dPDFSTOPONERROR -dNOPAUSE -sDEVICE=pdfwrite
-sOutputFile=z.pdf notation-test.pdf -c quit &>out
Indeed , in out I can see
% Reading compressed object (36384 0 obj) from ObjStm with object number
36313
Filter: offset 43248454(0x293eb46)
FILTER NAME:FlateDecode
36311 0 36315 115 36316 135 36317 288 36318 521 36321 612 36323 722 36320
765 36325 982 36326 1016 36327 1219 36328 1376 36329 1610 36330 1874 36334
1999 36335 2019 36336 2172 36337 2414 36340 2516 36341 2536 36342 2689
36343 2932 36346 3037 36347 3057 36348 3210 36349 3
449 36352 3547 36353 3567 36354 3720 36355 3962 36358 4063 36359 4083 36360
4236 36361 4475 36364 4574 36366 4684 36363 4727 36368 4971 36369 5005
36370 5545 36371 5698 36372 5983 36373 6076 36374 6358 36378 6468 36379
6488 36380 6641 36381 6875 36384 6964 36386 7074 2622
7117 36383 7161 36389 7348 36390 7368 36391 7388 36392 7421 36393 7608
36396 7835 36398 7945 2623 7988 36395 8032 36400 8183 36401 8203 36402 8223
36403 8256 36404 8443 36407 8670 36408 8690 36409 8710 36410 8743 36411
8930 36414 9157 36416 9267 36413 9310 36418 9482 364
19 9502 36420 9522 36421 9555 36422 9853 36425 10099 36427 10209 36424
10252 36429 10406 36430 10426 36432 10459 36433 10479 36435 10512 36437
10622 36434 10665 36439 10822 36440 10842 36442 10875 36443 10895 36445
10928 36447 11038 36444 11081 36450 11235 36451 11269 364
52 11425 36453 11791Filter: offset 43248454(0x293eb46)
FILTER NAME:FlateDecode
<<
/Type /Page /Contents 36385 0 R
/Resources 36383 0 R
/MediaBox[ 0 0 595.276001 841.890015 ]
/Parent 36387 0 R
>>
Error: /undefined in --runpdf--
Operand stack:
--nostringval-- --nostringval-- 12
Execution stack:
%interp_exit .runexec2 --nostringval-- runpdf --nostringval--
2 %stopped_push --nostringval-- runpdf runpdf false 1
%stopped_push 1933 1 3 %oparray_pop 1932 1 3 %oparray_pop
1917 1 3 %oparray_pop 1918 1 3 %oparray
_pop runpdf runpdf runpdf 14 1 958 runpdf
%for_pos_int_continue runpdf
Dictionary stack:
--dict:742/1123(ro)(G)-- --dict:0/20(G)-- --dict:86/200(L)--
--dict:7/10(L)--
Current allocation mode is local
GPL Ghostscript 10.04.0: Unrecoverable error, exit code 1
GPL Ghostscript 10.04.0: Page object was reserved for an Annotation
destination, but no such page was drawn, annotation in output will be
invalid.
:
:
GPL Ghostscript 10.04.0: Page object was reserved for an Annotation
destination, but no such page was drawn, annotation in output will be
invalid.
GPL Ghostscript 10.04.0: ERROR: A pdfmark destination page 841 points
beyond the last page 12.
As you said, we can use
mutool clean -d notation.pdf notation.uncompressed.pdf
and I also add mine
qpdf -qdf notation.pdf notation.qdf
(and in theory we can use verapdf, but it validates only pdfa files as far
as I know).
The key point is that with qpdf one can edit the *qdf* file (i.e
notation.qdf in our case)
and call fix-qdf notation.qdf > notation-edited.pdf
to have a pdf.
--
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/luatex/attachments/20250105/1d43a0b6/attachment.htm>
More information about the luatex
mailing list.