Advertisements

Bookleting a PDF with Landscape Pages

For reasons not relevant here, we had to make a booklet out of a PDF file that contained several wide tables that should print in landscape mode, but were tagged as portrait pages. As a further complication, the pdftops utility I normally use complained vociferously about nearly every page:

Syntax Warning: FoFiType1::parse a line has more than 255 characters, we don't support this

A bit of fiddling produced this recipe, with pdf2ps in place of the usual pdftops:

pdfcrop --margins "36 0 10 0" FileName.pdf 
pdftk FileName-crop.pdf rotate 41-46east output FileName-crop-rotate.pdf
pdf2ps -dLanguageLevel=3 -sPAPERSIZE=letter -dFIXEDMEDIA FileName-crop-rotate.pdf FileName-crop-rotate.ps
ps2book.pl -f 1 FileName-crop-rotate.ps
ps2pdf FileName-crop-rotate_book.ps

The gymnastics in pdf2ps forces letter-size pages, no matter what the internal size specifies.

That was not particularly obvious, but hooray for pdftk…

Advertisements