Re: Create pdf document from graphics
- To: mathgroup at smc.vnet.net
- Subject: [mg86430] Re: Create pdf document from graphics
- From: "L. Dwynn Lafleur" <lafleur at louisiana.edu>
- Date: Tue, 11 Mar 2008 02:58:26 -0500 (EST)
- Organization: University of Louisiana at Lafayette
- References: <fr0crv$er9$1@smc.vnet.net> <fr2md6$o1o$1@smc.vnet.net>
Thanks, Rob. Your clever solution fills the bill. Dwynn -- ====================================== L. Dwynn Lafleur Professor of Physics University of Louisiana at Lafayette lafleur at louisiana.edu ====================================== "ragfield" <ragfield at gmail.com> wrote in message news:fr2md6$o1o$1 at smc.vnet.net... > On Mar 9, 5:06 gam, "L. Dwynn Lafleur" <lafl... at louisiana.edu> wrote: >> [$Version = 6.0 for Microsoft Windows (32-bit) (February 7, 2008) ] >> >> Is it possible to export a list of Graphics to create a PDF document in >> which each graphic appears on one page of the document? gI tried >> >> Export["document.pdf", Table[Plot[x^n, {x, 0, 1}], {n, 1, 3}]] >> >> but got a PDF file with all three Graphics appearing as a list on a >> single >> page. gI suspect I need to add an "elements" parameter to the statement, >> but >> I can't figure what it should be. > > This is possible, but it's not as easy as it should be. The steps are > roughly as follows: > > * Put each of the graphics in a separate cell in a new notebook. > * Add a page break below each graphic cell > * Set up some printing options for that notebook. > * Depending on your OS, use the Page Setup dialog to set a custom > paper size for the notebook. > * Use NotebookPrint[] or File > Save As > PDF > > Everything except for the system page setup dialog can be automated. > Here's an example: > > nb = CreateDocument[ > Table[Cell[BoxData@ToBoxes[Plot[x^n, {x, 0, 1}]], > PageBreakBelow -> True], {n, 1, 3}], ShowPageBreaks -> True, > PrintingOptions -> {"PaperSize" -> {560, 460}, > "PageSize" -> {560, 460}, "FirstPageHeader" -> False, > "FirstPageFooter" -> False, "RestPagesHeader" -> False, > "RestPagesFooter" -> False}, Magnification -> 1.0] > > (* at this point use the Page Setup dialog to change to a custom paper > size of 7.78" wide x 6.39" high *) > > NotebookPrint[nb, "/tmp/example.pdf"] > > -Rob >