Friday 4 May 2018

ubuntu - How to split a PDF onto multiple pages on command line?


How can I split (tile?) one huge PDF onto multiple pages? The result can be one PDF with multiple A4 pages or several A4 PDFs.


Although I generated the PDF with dot I would like to have this problem solved in general -- or at least on a standard Ubuntu (eg. 12.04).


The input PDF has been generated by Graphviz dot, eg. dot -Tpdf sample.dot > sample.pdf. When I did not add a size="8,11"; ratio="fill"; to the graph the output PDF is very large. If I add the size/fill-hints dot only scaled things down for me.


Lets give you one example:


If my original PDF was huge like this:


+-------------------+
| |
| O |
| : |
| :..........C |
| : : |
| : : |
| : : |
| : G |
| : : |
| : : |
| : : |
| : : |
| U : |
| B |
| |
+-------------------+

This should be split by a command like


pdftile sample.pdf -x 2 -y 3 > sample-2x3.pdf

into


+---------+---------+
| | |
| O | |
| : | |
| :......|...C |
| : | : |
+---------+---------+
| : | : |
| : | : |
| : | G |
| : | : |
| : | : |
+---------+---------+
| : | : |
| : | : |
| U | : |
| | B |
| | |
+---------+---------+

I looked into the pdfjam toolset but it seems this feature is not implemented there. I would like it to be a command line tool -- and it should be automated, not manually



Answer



It looks like pdfposter can do this.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...