[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] Need help with pdfmark

From: Larry Kollar
Subject: Re: [Groff] Need help with pdfmark
Date: Fri, 22 Oct 2010 15:01:14 -0400

Got it! It took a while for my brain to sharpen up a little bit, but it's 
making sense. Mostly.

> Multiple pre-processing passes are required... to locate any PDF reference 
> marks

That got me wondering. I use a two-pass scheme to get cross-refs right; the 
very first time it gets run it might need to be re-run just because it was 
starting out with blank xref strings. But I rarely if ever see any pagination 
issues otherwise. Since I already capture heading strings and pages, I replaced 
the "format interpreter" with one that merely defines PDFHREF.TEXT and 
PDFHREF.DESC to its arguments and use the text I already have to set the link 

The biggest change I had to make in my processing was to remove the -z option 
from groff on the first pass and route the output to /dev/null -- without this 
change, the \O2 output was suppressed as well. This adds some processing time, 
but it's still a lot faster than FrameMaker. ;-) So the generation process is 
fairly straightforward:

1) First groff pass: build the "aux" file, containing ToC, Index, cross-refs, 
and (now) pdfhref information.

2) Extract the various data from the aux file using scripts.

3) Second groff pass: insert the extracted data and create the PS file.

4) ps2pdf to build a PDF with bookmarks and now links!

Just wondering about the "multiple passes" thing and if it's going to bite me 

Thanks much for your help, Keith. If I get a chance, I'll try to flesh out some 
of the pdfmark documentation for you.

-- Larry

reply via email to

[Prev in Thread] Current Thread [Next in Thread]