asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.14k stars 500 forks source link

Lulu syntax error with prepress PDF #2476

Closed meonkeys closed 7 months ago

meonkeys commented 7 months ago

I'm able to generate a great-looking PDF. When I try to run pdftotext on it or upload it to Lulu, I get syntax errors. pdftotext says Syntax Error (302628): Incorrect number of arguments in 'scn' command(36 times, sometimes with SCN in uppercase). Lulu says We've found an error in your PDF and can't automatically repair it. Please revise the file or contact support for more assistance. \nError Message: Error in PDF syntax.. Here's the book source: https://github.com/meonkeys/print-this/blob/main/book/print-this.adoc . Here's the PDF with syntax errors: print-this.pdf. If I unset prepress, the errors are no longer reported by pdftotext nor Lulu. Side note: qpdf --check never reports any errors regardless of prepress.

Discussion: https://asciidoctor.zulipchat.com/#narrow/stream/288690-users.2Fasciidoctor-pdf/topic/syntax.20error.20with.20prepress.20PDF

I don't need to run pdftotext, I just noticed pdftotext failures seemed to coincide with Lulu failures. I used it as a local/fast test to git bisect when the error appeared. There were other changes, but toggling media: prepress gives me a consistent repro.

I'm really just trying to use some print on demand service. I picked Lulu arbitrarily... this is the first time I've tried to print any book. Suggestions welcome for other print-on-demand printers, especially any PoD services known to work well with Asciidoctor-PDF.

mojavelinux commented 7 months ago

I don't want this conversation to get split up. Let's continue it in the chat until we determine there is actually an error in Asciidcotor PDF / Prawn to be fixed.

mojavelinux commented 7 months ago

This turned out to be a duplicate of #2477.

meonkeys commented 7 months ago

I verified the fix for #2477 results in a prepress PDF that passes Lulu's PDF validator.

mojavelinux commented 7 months ago

I'll raise my glass to that! Thanks Adam!