Edit3: I've updated the title, hopefully satisfying the people saying this item is off-topic: The reason I think this post does have value to this community is that the answer maybe off-topic (i.e. a bug in qpdf), but the question definitely was not. I spent quite some time fiddling with the Beamer frames that appeared to be the culprit, so let's hope this item can save others the effort. BTW: I just send a message to Jay on the qpdf issue, referring to this post.

I have a PDF document generated using pdflatex, and I used qpdf to linearize it. The initial document reads and checks fine, while the linearized document has the first pages damaged and produces an error at checking:

(object 269 0, file position 307): expected n n obj

It's a Beamer presentation including a lot of screengrabs. I thought I found the frame responsible (outcommenting it makes the problem disappear), but the frame looks fine, and even replacing it with a copy of the next frame generates the same problem. And nothing suspicious before it.

Displaying the linearized document using evince gives me a lot of empty pages at the start and errors like this:

Syntax Error (4697): No font in show/space
Syntax Error: Unknown font tag 'F21'

Any ideas on how to solve this problem or how to debug it?

For those willing to try to linearize themselves: here's the document (warning: 50MB download):


(link edited to make room for linearized document)

I also tried pdfopt, creating a linearized document that appears to be just fine. Checking it with qpdf, however, results in a core dump.

I'm wondering whether it's a problem with qpdf instead of an issue within the document...

Edit: I'm ignoring the qpdf core dumping for now; the file generated by pdfopt seems to work in Acrobat Reader and Firefox (both on Linux), though Firefox is not showing the document until it has been downloaded completely. Need to look into that.

Edit2: Just checked out the pdfsizeopt tool suggested by Keks (tnx!). It requires sam2p and tif22pnm, for which RPM packages can be found, but also pngout, that hasn't been updated for Linux for almost a decade. Looks like a Windows-only party, so I'll leave this for now.

Edit4: applying pdf2ps followed by ps2pdf does indeed create a smaller PDF document, but it makes me lose all hyperlinks and meta-data. Will report back on gs...

closed as off-topic by Martin Schröder, Speravir, Masroor, Heiko Oberdiek, Jesse Feb 21 '14 at 2:37

  • This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Why do you need qpdf? To shrink the pdf I suggest to use pdfsizeopt.py: github.com/pts/pdfsizeopt Great software. – Keks Dose Feb 20 '14 at 11:01
  • qpdf was one of the tools for linearization recommended on this site, and I, of course, assumed it was (is?) my document causing the issue instead of qpdf. I don't use anything else than Linux, so consistent behaviour across PDF generators and processors make me feel confident that the document can be read without problems on other platforms. – Adrian Feb 20 '14 at 21:55
  • 3
    Via ghostscript (pdf2ps then ps2pdf), I got a perfect PDF (14Mb). – Paul Gaborit Feb 20 '14 at 23:05
  • 1
    I can confirm this as a bug in qpdf 5.1.1 on Linux. Please report a bug with the project. In the past Jay was very responsive. – Martin Schröder Feb 20 '14 at 23:32
  • 4
    This question appears to be off-topic because it is about a bug in a software not directly related to TeX. – Martin Schröder Feb 20 '14 at 23:33

Browse other questions tagged or ask your own question.