I want to have different margins in my notebook for bookbinding. I could change header and footer, but I couldn't individually change page margins
2 Answers
I needed to create PDF documents from my data automatically. What I needed was PrintingOptions -> {"PrintingMargins" -> 30}
. Here is a full minimal example:
text = "Test";
doc = CreateDocument[
Column[{Text@Style[text, "Subsection"],
Plot[Sin[x], {x, 0, \[Pi]}]}],
PrintingOptions -> {"PrintingMargins" -> 30}];
Export["test.pdf", doc]
I got inspiriration from a mathgroup post. I understand, that is not exactly what was needed in the question, but strongly related.
The dialog presented by the File > Print Settings... menu allows each of the four page margins, left, right, bottom, and top to be given individual values.
-
$\begingroup$ I know that, but... I want to change individually for odd and even pages $\endgroup$– GonzaloCommented Mar 8, 2015 at 1:30
-
$\begingroup$ On my system and printer, I don't do that in the Mathematica's print preferences, but in the Print... dialog under Duplex Printing and Margin, where I specify a stapling margin that automatically alternates on left and right pages. $\endgroup$ Commented Mar 8, 2015 at 2:17
-
$\begingroup$ oh, i want to export my file to PDF $\endgroup$– GonzaloCommented Mar 8, 2015 at 7:13
-
$\begingroup$ @Gonzalo. Again, on OS X, that can be done by the printer dialog, bypassing Mathematica's export system. That is, I choose Save as PDF... in the printer dialog. $\endgroup$ Commented Mar 8, 2015 at 13:56