The Computer Oracle

Is there a command-line method to split a gigantic single-page PDF file into one file with multiple pages?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: The Builders

--

Chapters
00:00 Is There A Command-Line Method To Split A Gigantic Single-Page Pdf File Into One File With Multiple
01:07 Accepted Answer Score 7
01:15 Answer 2 Score 1
01:54 Answer 3 Score 4
02:47 Answer 4 Score 8
03:04 Thank you

--

Full question
https://superuser.com/questions/437148/i...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#ubuntu #commandline #pdf

#avk47



ANSWER 1

Score 8


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.




ACCEPTED ANSWER

Score 7


It looks like pdfposter can do this.




ANSWER 3

Score 4


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.




ANSWER 4

Score 1


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)