[lug] pine-file-append-pdf-what!?

Tkil tkil at scrye.com
Sat Sep 8 16:05:55 MDT 2001


>>>>> "John" == John Karns <jkarns at csd.net> writes:

John> What I would do is break it up again into its original
John> components.  I would suspect that one would be unable to merely
John> concatenate various pdf's and expect that they would view as
John> pages of one large document, with similar results if one were to
John> try this with any other type of (enhanced-ASCII) document files,
John> whether it was Staroffice or MS's counterpart.  The reason being
John> that although there is ASCII within each component file, it is
John> essentially contained within an "envelope" specific to the
John> application, which would specify formatting details such as
John> no. of pages.

nicely stated.

John> You should be able to reverse the process with an editor or even
John> with 'less' which accomodates writing selected segments to disk.
John> It shouldn't be too difficult, but the trick would be to
John> correctly distinguish each segments original boundary.

pdf files should always have "%PDF-<version>" at the beginning of the
file (so, something like "%PDF-1.1".  at the end, they should always
have "%%EOF".  both of these should be on separate lines, but they
might use just CR, instead of CRLF or LF, to indicate line ends.

it's complicated by the fact that most PDFs are, in fact, binary (at
least w.r.t. line endings and whatnot).  so, you can use an editor
that can handle binary files (such as x?emacs) or you can write a
small script that would scan for that string, and dump each section
into an independent file.

t.



More information about the LUG mailing list