I have a number of images in a Mathematica array, and I'd like to export the images to a PDF s.t. each image is precisely scaled to be $n \times m$ millimeters in dimension. The idea is that printing the PDF out on $8.5$ by $11$ inch ($215.9$ mm $\times$ $279.4$ mm) paper will give me images that can be measured with a ruler to be $n \times m$ millimeters.

If the dimensions of the images are not precisely $n \times m$ millimeters in dimension, is there a simple way to do this? I can also easily just apply ImageCrop to each image in the array as a preprocessing step.

  • $\begingroup$ @YvesKlett In this question, I need to scaling technique to work for an array of images. $\endgroup$
    – Bob
    Dec 18, 2013 at 14:19
  • $\begingroup$ Perhaps you can clarify your question and add sample code and images. $\endgroup$
    – Yves Klett
    Dec 18, 2013 at 14:32
  • $\begingroup$ @YvesKlett I solved my problem with a little work using the link you provided. Thank you. I would delete this question, however I'm having trouble registering. Could you or another administrator help me delete my post? $\endgroup$
    – Bob
    Dec 18, 2013 at 15:00
  • $\begingroup$ I voted to close as duplicate. You might also consider self-answering and making your Q useful for future visitors. If you want it deleted, you can flag the question and get mod attention (or someone else does that for you). $\endgroup$
    – Yves Klett
    Dec 18, 2013 at 15:07

1 Answer 1


I would suggest you make a large graphic object the size of a page, say ImageSize->{700, 1000}, with some details like a grid. Then experiment with the Mathematica print options for margins until you have something that consistently prints at a size you want with the margins you want. Then you can Inset all the graphics you need with a predictable result. See here for an example of Inset for page layout: 2 column documents in mathematica


page = Graphics[{White, Rectangle[{0, 0}, {330, 400}], 
    Inset[column1, {75, 295}, {Center, Center}, {150, 210}], 
    Inset[column2, {255, 295}, {Center, Center}, {150, 210}], 
    Inset[clippedimage, {165, 90}, {Center, Center}, {330, 179}]}, 
   PlotRange -> {{0, 330}, {0, 400}}, ImageSize -> 330];

nb = CreateDocument[ExpressionCell[page, "Print"]];

ExpressionCell[..., "Print"] is necessary for printing at the same size as the output from Print[page] would print.

Print output can then be directed to CutePDF or pdfFactory, etc.


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