Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'How to export to multi-pages pdf?' topicStudent Support Forum > General > Archives > "How to export to multi-pages pdf?"

Next Comment >Help | Reply To Topic
Author Comment/Response
Armando Sano
06/14/10 01:57am

According to the documentation, it is easy to import images from a multi-page .pdf document into as many images as there are pages, using the "Pages" or "Pages", n mechanism.

What about the reverse? Suppose I have a collection of plots (e.g. depending on a parameter):

plot[a_]:=Plot[Sin[a x],{x,0,Pi}]

It is easy to export the collection as an animated .gif using:

Export["animated-plot.gif", Table[plot[a],{a,1,10}]]

However, .gif exports the graph as a bitmap, whereas .pdf keeps the vector format. Unfortunately, issuing

Export["animated-plot.pdf", Table[plot[a],{a,1,10}]]

results in a 1-page .pdf file containing the list. I have the feeling that using the "Pages" and/or "Rules" attributes/elements of the Export[] function would manage to do this, but I haven't been able to.

A workaround is to export every frame separately and then recombine them with another tool (such as pdfjoin, or pdftk on Unix-based systems):


and then join the resulting files "plot-frame1.pdf" to "plot-frame10.pdf" into a single multi-page .pdf file. But clearly, this is not very direct nor clean. Is there a way to achieve that more simply?

Thanks for any advice!

URL: ,

Subject (listing for 'How to export to multi-pages pdf?')
Author Date Posted
How to export to multi-pages pdf? Armando Sano 06/14/10 01:57am
Re: How to export to multi-pages pdf? Nikolaus Son... 11/12/10 09:26am
Next Comment >Help | Reply To Topic