Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Mathematica create multi-page PDF files?

When one imports a multi-page pdf file (the file I have in mind contains images of artwork, one per page) into Mathematica 8.0.1 by

book = Import["simple.pdf"]

Mathematica returns a list of graphics objects, one for each page. I have some manipulations I perform on each page, and then want to save the changed pages back into a single PDF file

Export["DistortedSimple.pdf", distortedbook]

the resulting file has all of the images on a single page. Is there a convenient way to export a list of images to PDF, one per page?

like image 982
Kevin O'Bryant Avatar asked Nov 02 '11 01:11

Kevin O'Bryant


People also ask

Can a PDF have multiple pages?

Yes, you can add one or more pages to a PDF file. Upload a PDF using the Insert Pages tool and sign in to Acrobat online. Use your cursor to select the desired insertion point, and then select the file or files you want to add from the resulting dialog box.

How do I export a Mathematica notebook to PDF?

With the notebook you wish to export to PDF set as the active window, select File ▶ Save As, give the file a name, select PDF as the file type, and then click Save.


1 Answers

(Hi Kevin!)

I just evaluated:

Print[ExampleData[#]] & /@ Take[ExampleData["TestImage"], 6]

Export["Desktop/Kevin.pdf", EvaluationNotebook[]]

using V8.0.1 for OS X, and the resulting PDF was split into four pages. So I think you best approach is to (programmatically) create a notebook of your modified images, and export that notebook.

like image 162
Brett Champion Avatar answered Oct 18 '22 14:10

Brett Champion