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 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.

share|improve this question

marked as duplicate by Yves Klett, Michael E2, belisarius, bobthechemist, rm -rf Dec 18 '13 at 19:39

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.

@YvesKlett In this question, I need to scaling technique to work for an array of images. –  Bob Dec 18 '13 at 14:19
Perhaps you can clarify your question and add sample code and images. –  Yves Klett Dec 18 '13 at 14:32
@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? –  Bob Dec 18 '13 at 15:00
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). –  Yves Klett Dec 18 '13 at 15:07

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

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