Menu

#126 annotating PDF 1.5 docs

open
nobody
None
5
2011-08-22
2011-08-22
Jim
No

I use xournal to annotate PDF docs that are made with pdftex.
pdftex now creates PDF 1.5 by default. Exporting an annotated PDF 1.4
documents to PDF works quite well, but exporting an annotated
PDF 1.5 doc creates a huge file.

While I can tell pdftex to output PDF 1.4, presumably the world is headed
to PDF 1.5.

Are there any plans to upgrade xournal to handle PDF 1.5 ?

Thanks.

Discussion

  • Denis Auroux

    Denis Auroux - 2011-08-22

    Xournal's "export to PDF" handles all the files that its rudimentary PDF parser can read. This means, essentially, those where the object catalog (the "xref" table) is accessible in clear instead of being hidden inside a compressed data stream. That includes all non-encrypted PDFs up to 1.4, and many (but not all) more recent PDF files. It is unfortunate that indeed recent pdftex versions do seem to compress the xref table.

    When the parser fails to understand the PDF document, it instead embeds a bitmap rendering of it, which of course is much larger and much lower quality, so you really don't want to "Export to PDF" on such files.

    Rewriting the parser to handle this is not a huge project, but it's still not very high priority, because you can
    instead use "File -> Print -> Print to File -> PDF". This uses a different mechanism (poppler rendering to a cairo surface that goes to the PDF printer) and should yield better results on such files. (Unfortunately, on the example you posted in another thread, it looks like cmttb10 gets pretty badly mangled by the poppler/cairo processing.)

    (Unfortunately, the PDF format, its variations, and font issues are complicated enough that it's not always easy to predict which of the two rendering paths will give a better pdf file. For pdftex-generated PDF 1.5's, definitely go for File -> Print -> Print to file; for PDF 1.4's, Export to PDF seems to better preserve the bitmap fonts).

    Given that xournalpp is on its way soon, I think the most important at this stage would be to ensure that xournalpp does at least as well, and ideally better, than xournal.

    Denis

     
  • Jim

    Jim - 2011-08-22

    Thanks for the information.

    Given your message, I see that if I make a PDF 1.5 doc with \pdfobjcompresslevel=0 xournal
    can export to PDF quite nicely.

    Since I know a work-around, I'll happily use that for now. Perhaps xournalpp (or is it xournal++,
    I've seen both) will be able to read compressed xref tables at some point.

    Cheers.

     

Log in to post a comment.