[lug] Combining pdf documents

Tkil tkil at scrye.com
Sat Jan 11 22:46:29 MST 2003


>>>>> "Wayde" == J Wayde Allen <wallen at its.bldrdoc.gov> writes:

Wayde> I need to combine a number of pdf papers into a single
Wayde> document.  I'm wondering how best to do that?  Can I do this
Wayde> using LaTeX?  If so how?  Additionally I need to add some
Wayde> preface material and update page numbering.

Your best bet is to get sane source material (e.g. the original
documents that generated the PDF).  Not always possible, but
definitely better than working with the output PDF.  Of course, some
of the source is probably MS Word or similar bletcherous formats,
so even that might not help you all that much, sadly.

Think of PDF as electronic paper, and you're not too far off.

There might be ways to join pages together in the realm of PDF, but
it'd be touchy at best.  Also, doing things like changing page numbers
would be ... challenging.  (Just masking out the page numbers
themselves is one thing, and might be doable; but what do you do if
the text says "see figure 5 on page 8" or whatever?)

If you do have the time to do it, extracting the text and resetting it
might be possible.  It'd be the most intensive by far -- especially if
you have equations and displays / charts -- but it is the only way to
get perfect output.

If you are happy enough to just do your own preface and wrapping
pages, then the suggestion to use pdf2ps on the individual documents,
render your additional pages as postscript, merge them (there's a
ps<mumble> that does that, assuming that pdf2ps generates correct
document structuring convention comments), then distill the whole
thing back to PDF.

Good luck,
t.




More information about the LUG mailing list