joining multiple PDFs into one

Andrej Marjan andrej-igvx78u1SeH3fQ9qLvQP4Q at public.gmane.org
Tue Nov 15 21:09:28 UTC 2011


On Tue, Nov 15, 2011 at 4:03 PM, Russell Reiter <rreiter91-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:

> Someone else had posted that: cat file1.pdf > out.pdf cat file2.pdf
> >>out.pdf cat file3.pdf>>out.pdf worked and they were able to see all
> three PDF pages. Before anyone jumps on this I know this is not the
> same as the following.
>
> cat file1.pdf file2.pdf file3.pdf>out.pdf did not work, even though
> the man page says it should. I see only two possibilities, your
> environment changed the way cat works or your pdf parser couldn't do
> what the parser of the person who had success viewing the document
> could do, and that is deal with the multiple headers and eof
> characters in the resulting single document.
>
>
cat file1.pdf file2.pdf file3.pdf>out.pdf  worked just fine, just the way
it was supposed to. The resulting out.pdf happens to violate the PDF spec,
just like mindlessly concatenating multiple files of *any* structured
format not designed for this will render invalid output files. *That* was
the problem, *not* the behaviour of cat(1).

As always, what happens when you try to process a garbage input file is
implementation-dependent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20111115/6a2165d0/attachment.html>


More information about the Legacy mailing list