# How can I change printing margins by page?

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

• What stylesheet do you use? – Mahdi Mar 8 '15 at 1:44
• I made my own stylesheet @Mahdi – Gonzalo Mar 8 '15 at 7:09

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.

• I know that, but... I want to change individually for odd and even pages – Gonzalo Mar 8 '15 at 1:30
• 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. – m_goldberg Mar 8 '15 at 2:17
• oh, i want to export my file to PDF – Gonzalo Mar 8 '15 at 7:13
• @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. – m_goldberg Mar 8 '15 at 13:56

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.