>   I have 2 PDF documents (same document, 1 pdf is the from, the other
>   pdf is the back)

>   Anyone knows a way (ideally scriptable) to merge the 2 documents
> into 1 so that the pages are interleaved ?

Here's how I'd go about it:

- Use pdfinfo to get the page count of each document.
- then for each page, do "pdftops -f $page -l $page ...".
- use `cat' to combine the resulting PS files (one PS file per page).
- make it a PDF file again via ps2pdf.

IIRC last time I had to do something along these lines you may have to
fiddle around with (i.e. remove) the DSC comments in the PS files
(there's a risk otherwise that the ps->pdf conversion trusts the DSC
comments at the beginning of the document and fails to see that there's
more than one page).


        Stefan
_______________________________________________
mlug mailing list
[email protected]
https://listes.koumbit.net/cgi-bin/mailman/listinfo/mlug-listserv.mlug.ca

Reply via email to