Darwin's Theories Blog

New Theories for a New Time

Splitting an OpenOffice file or a PDF into 1-page PDFs or Bitmaps

Using pdftk or ghostscript
OpenOffice has this great bug that's been there since before 1.0 requesting this feature, but nothing's ever come of it, even after 3.3. And the community fork LibreOffice is still building (it takes many hours to compile, even on modern hardware). So I needed something in the interim.

My first try was to save the whole document as PDF, and use pdftk to split it.

pdftk 01_About.pdf burst

Did the split, creating 35 nice one-page PDF's so fast I had to check that they existed.
Then copy them over to the next workstation, only to find that the software there doesn't accept PDF's. PDFTK: Success; receiving software: FAIL!

Take II. GhostScript. After a couple of tries due to my own typing errors, this worked:

gs -sDEVICE=jpeg -r100x100 -sOutputFile=01/slides/slide%02d.jpg 01_About.pdf

Bingo! 35 JPEG files of about the right size. Veektory...
Reply from Anonymous at 2011-03-26 16:20:15.305

A test comment. Please ignore.