Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

This question already has an answer here:

I want to export my plots (plot1 and plot2) as a pdf file. Since plot1 contains 4 figures in matrix form, so it will not fit in one page.

Export["plot.pdf", CreateDocument[Riffle[{plot1, plot2}, Cell["", "PageBreak", PageBreakBelow -> True]], Visible -> False]]

Here are my 2 questions:

1. How can I control the page layouts (e.g., landscape) when exporting to pdf file ?

2. Do we have to set the imagesize by ourselves all the time to make figures fit in one page ?

share|improve this question

marked as duplicate by Jens, RunnyKine, m_goldberg, Yves Klett, Öskå Aug 16 at 1:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

How can I control the page layouts (e.g., landscape) when exporting to pdf file ?

I know the answer, if you want to print the notebook or a particular cell to pdf. I prefer virtual printers to exporting files.

There is a variable named "PaperOrientation". Format >> Option Inspector... >> Show option values: ...(select your notebook to print) >> Notebook Options >> Printing Options >> "PaperOrientation" >> "Landscape".
Or, evaluate:

CurrentValue[Notebook, {PrintingOptions, "PaperOrientation"}] = "Landscape";

Do we have to set the imagesize by ourselves all the time to make figures fit in one page ?

Again, in Option Inspector. Look for Formatting Options >> Expression Formatting >> GraphicsBoxOptions >> ImageSize >> ...(whatever you want). If you want to fit graphics to page, set the value of ImageSize to Scaled[1]. But following code:

CurrentValue[Notebook, {GraphicsBoxOptions, ImageSize}] = Scaled[1];

doesn't work unfortunately. I guess I've made a mistake. Anyway, you can specify any option value using the Inspector.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.