PDF bookmarks

Sorry if this has already been posted or is already a feature that I’m unaware of. I’d find it useful, when compiling PDFs, if Scrivener would generate bookmarks for each folder and/or text in my draft.

That would be nice. Speaking for the Mac side, PDFs are created as a byproduct of the printing system, so having intelligent coding in the PDF itself is a bit outside of the OS’s scope. Changing that for Scrivener would mean abandoning the OS X PDF generator, and there honestly isn’t much out there that could step in to replace it. Windows is slightly different, but bound by the same limitations in respect to the reliance upon a third-party tool. What it can do is what we can do and the only way around that is to use something else (there isn’t much choice) or making our own—which is a huge job.

What I use for the user manual PDF, which is fully cross-linked internally, is MMD and LaTeX. That is, right now, the only way to get rich PDFs straight out of Scrivener. It’s unfortunately a bit to learn though, and requires some new ways of approaching how documents are made.

So the main alternative I can think of, strictly for stuff like a clickable table of contents and bookmarks, is getting Adobe Acrobat Pro to edit the output. I’m not sure how well that works though as I’ve never had cause to try it.

Aaigh!!! LaTeX!!! Sorry, minor flashback. I used it once in a web app to populate PDF forms with data. As difficult as it was to figure out, I still know of no better alternative for that purpose.

Yes, it’s annoying. I’d love to have properly linked tables of contents and a navigation table (the sort that appears in the drawer in Preview), too, but, as Ioa says, because the OS X PDF generator is really just a byproduct of the printing code (internally I believe OS X builds a PDF for the printing process, and so it also allows you to save it), there’s no way of incorporating any interactivity. The only way would be for me to take the PDFKit and try to hand-build the PDF files, page-by-page, which would not be pretty - and I’m not even sure PDFKit allows that much freedom.

All the best,

From how I understand it, that’s pretty close. Actually the whole system uses PDF technology for display. It’s the fundamental drawing engine that is used in the Quartz layer beneath Cocoa and replaced Display PostScript (from the NeXT days) around circa Panther. Supposedly[size=85][1][/size], nearly everything you see is PDF on OS X, so in fact printing a PDF is just extracting the display code. So the analogy of it being “taking a picture of the screen” and saving it as PDF is pretty close, though it’s more like taking a picture with the display. Either way, it’s not using “PDF” as we know it for document creation. It’s using PDF as a raw layout system, which is necessarily stripped down and optimised for screen drawing.

Anyway, point I’m making is the display PDF engine is different than the document PDF engine (which can have hyperlinks, and annotations, and all that good stuff), so that’s why stuff coming out of the print engine is “dumb pages”.

[size=85][1]: There is some degree of mystery surrounding how much of the system is display PDF. Apple claims are big, analysis suggests otherwise.[/size]

That sounds to me like a good healthy and sane response. :slight_smile: I love the output, but I don’t so much like messing with it. Hence, MMD to do the dirty work.

Although stuff coming out of the print engine does allow for clickable web links…

That is true, and they do have actual text—it is not purely a “picture” of the screen, that phrase was a little misleading. I wonder if the difference is in whether the display PDF spec doesn’t have the anchor/bookmark bit that would allow for an internal link and software table of contents.

Further to the OP, I’ve done some looking around, and OpenOffice has a good Export to PDF function that supports table of contents and cross-referencing. Might be worth checking out as it also does a good job of reading Scrivener’s RTFs (and the next version of Scrivener will have good ODT export, too). So that would be a much cheaper way to go that Acrobat Pro.

Can your implementation of LaTeX use additional packages? If so, hyperref seems to offer this functionality.

pa.op.dlr.de/~PatrickJoeckel … index.html

Yes, that is what MultiMarkdown uses for its PDF output which is how it gets clickable regions. This isn’t Scrivener though (nor the OS X sub-system Scrivener uses). There are multiple output methods with the program, some of them using post-processing supplied by other technologies. Kindle .mobi files are created using Amazon’s KindleGen utility, and LaTeX files are created using the MultiMarkdown processing system. There is actually no way to get straight to PDF from Scrivener via LaTeX. We might be adding that at some point, but right now you can just get a .tex file out of the program. Scrivener is responsible for only the first stage of that: generating the source plain-text MMD file.

When you choose “PDF” in the compile menu that has nothing to do with LaTeX—that’s what we were talking about above. It uses the Mac OS X Quartz engine to generate those, using PDF version 1.3.

The new Mac beta supports internal links for PDF documents, including linked tables of contents:


All the best,