Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
    
See also superuser.com/questions/54054 and duplicate candidates. – Skippy le Grand Gourou Feb 12 at 21:13
up vote 6 down vote accepted

It looks like pdfposter can do this.

share|improve this answer

Several linux utilities come to mind:

(from their man pages)

pdfseperate [options] INPUT.PDF OUTPUT%d.PDF

reads INPUT.PDF, extracts one or more pages, and writes one PDF file for each page to OUTPUT%d.PDF (%d is placeholder for page number) (from 'poppler-utils' package)

pdftk INPUT.PDF burst

reads INPUT.PDF, producing one or more PDF files containing individual pages, named 'pg-XXXX.pdf' (unless output filename specified) (from 'pdftk' package)

share|improve this answer

Take a look on http://www.graphviz.org/doc/FAQ.html: Q14. How can I print a big graph on multiple pages?

The page attribute, if set, tells Graphviz to print the graph as an array of pages of the given size. Thus, the graph

digraph G { page="8.5,11"; ... }

will be emitted as 8.5 by 11 inch pages. When printed, the pages can be tiled to make a drawing of the entire graph. At present, the feature only works with PostScript output. Alternatively, there are various tools and viewers which will take a large picture and allow you to extract page-size pieces, which can then be printed.

ONLY Postscript! But for automation no showstopper :-). Just let ps2pdf run over it. It worked for me.

share|improve this answer

Actually mutool has almost the same syntax as the one you're suggesting (are you its author ??) :

mutool -x 2 -y 3 sample.pdf sample-2x3.pdf

To install mutool, just install mupdf, which is probably packaged with most GNU/Linux distributions.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .