2
$\begingroup$

enter image description here

I am looking for something like this:

SetOptions[EvaluationNotebook[], "PaperSize" -> "A3"]

The options are listed, but where do I find the arguments? Say for A3 paper, do I use A3 or "A3" or "a3paper"?

and it looks like it takes two inputs? How?

I can change them everytime from the drop down menu, but it's not very efficient.

$\endgroup$
  • 1
    $\begingroup$ see PrintingOptions >> Details? $\endgroup$ – kglr Jan 29 '15 at 19:56
  • $\begingroup$ ... For A3 paper size I think the numbers should be {842, 1190}. $\endgroup$ – kglr Jan 29 '15 at 19:59
  • $\begingroup$ A3: Round[72*QuantityMagnitude@UnitConvert[Quantity[#,"Millimeters"]&/@{2*210,297},"Inches"]] $\endgroup$ – Jinxed Jan 29 '15 at 20:29
2
$\begingroup$

According to this A3 is {842, 1190} printers points, so to set that and a variety of print related options programmatically:

SetOptions[EvaluationNotebook[],
 RulerUnits -> "Points",
  PageHeaders -> {{
        Cell[
          TextData[{
              CounterBox["Page"]}], "PageNumber"], 
        Cell[
          TextData[{"Author"}], "Header"], None}, {None, 
        Cell[
          TextData["Article title"], "Header"], 
        Cell[
          TextData[{
              CounterBox["Page"]}], "PageNumber"]}},
  PageFooters -> {{None, None, None}, {None, None, None}},
  PageHeaderLines -> {False, False},
  PrintingOptions -> {"FacingPages" -> True,
    "FirstPageFace" -> Right,
    "FirstPageFooter" -> True,
    "FirstPageHeader" -> False,
    "Magnification" -> 1,
    "PageFooterMargins" -> {30, 30},
    "PageHeaderMargins" -> {60, 60},
    "PageSize" -> {842, 1190},
    "PaperSize" -> {842, 1190},
    "PrintCellBrackets" -> False,
    "PrintRegistrationMarks" -> False,
    "PrintingMargins" -> {{90, 90}, {60, 90}}}
 ]
$\endgroup$
1
$\begingroup$

This should get you started for A3:

SetOptions[EvaluationNotebook[], 
 PrintingOptions -> {"PaperSize" -> 
  Round[72*
   QuantityMagnitude@
    UnitConvert[Quantity[#, "Millimeters"] & /@ {2*210, 297}, 
     "Inches"]]}]

Background

Mathematica assumes 72pt per inch for the PaperSize-option. The example above just uses the Quantity functionality for conversion from the DIN-dimensions (I used the equivalent of two A4 sheets for reference).

Be aware, though, that the PrintingOptions feature might change in the future (see the online reference for that warning).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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