Message Boards Message Boards

0
|
6697 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Printing Business cards and more

Posted 11 years ago
I just spent far too much time trying to make some business cards with nice fonts and glitzy Mathematica graphics. The hard part proved to be scaling and positioning the images to line up with prepunched cardstock (Avery). No joy, and in the end I had to make do with something yucky using MS Word. The real problem I encountered is more general than just making business cards. 
How does one produce printed graphics with Mathematica that are of precise final dimensions? I am thinking of "blueprints" and maps for example. And I mean real scaled maps for navigation or drawings for construction where size matters. 
For a trivial example, how does one print the output of the following command, on any printer, and have it come out as a circle exactly 10 cm in radius on the printed page?
Graphics[Circle[{0, 0}, 10], Frame -> True, Axes -> True]
2 Replies
Posted 11 years ago
Hello Christopher,

I may be way out on a limb here, but can't one use ImageSize, in Graphics? For instance:
Graphics[Disk[], Frame -> False, Axes -> False, ImageSize -> {100, 100}]

This gives me a Disk, 100 by 100 units. For me that corresponds to 2.6 centimeters.

EDIT: Maybe better is to use inches, as indicated by the Documentation: https://reference.wolfram.com/mathematica/ref/ImageSize.html?q=ImageSize&lang=en. At least then I am able to produce exactly 10 centimers by 10 centimeters :-)
POSTED BY: Simon P.
Thank you for this suggestion. The documentation for ImageSize in the Mathematica documentation says it uses PrintersPoint as its units in a couple of places, and later it says pixels, which is confusing. Assuming PrintersPoint is the correct unit, when I run the following code, I expected a 10 cm radius circle:
Graphics[Circle[{0, 0}, 10], Axes -> True,
ImageSize ->  20* (72/2.54), PlotRangePadding -> None, Ticks -> None]
having set Magnification->1 in the Global options, and in the Front End, and in the Printer Page Setup, with the FrontEnd ScreenEnvironment->Printout. I get instead a circle of radius 5 cm on my iMac (1920x1080) screen, and of radius 7.2 cm on a printout from a HP LaserJet Pro. This result suggested trying a different interpretation for ImageSize, and the following code produced my desired test result:
r = 10; (* desired circle radius *)
Graphics[Circle[{0, 0}, r], Axes -> True,
ImageSize ->  2*r* 39.3701,
PlotRangePadding -> None, Ticks -> None]  (* ImageSize is a scaling factor times twice the radius *)
which prints (most of) a 10 cm radius circle on my printer. The scaling factor of 39.3701 happens to be the number of inches per meter. Why is this needed here - I don't know, but it gives the right answer. Anyone got an explanation for why this works ?
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract