3
$\begingroup$

None of the links bellow seem to answer the problem with printing graphics "scaled to the real world" anymore:

real size image printing

exporting pdf with a precise page dimension in metric units rather than printer

how to set distance between ticks to 1cm

When I created a rectangle in MS Word (any version) and specify it to be 2cm x 3cm and then printed it (on many different printers) then guess what... if you measured the rectangle on the paper it was precisely 2cm x 3cm.

Why Mathematica is not able to do such a simple task? Few years old code (which probably worked at that time, not sure) does not work anymore. Furthermore you still had to give Mathematica data like 72, 2.54... and what to do with it to get the result correct like that can not be done automatically like in MS Word for example.

I adapted code from the third link to print circle of radius 2.75cm:

cm = 96/2.54*8/7.7;
range = Range[0, 4, 0.5];
g = Graphics[{Circle[{2, 2}, 2.75/2/2]}, Frame -> True, 
  GridLines -> {{0, 4}, {0, 4}}, PlotRange -> {{0, 4}, {0, 4}}, 
  ImageSize -> 8 cm, PlotRangePadding -> None, ImagePadding -> None, 
  ImageMargins -> 0]
Export["grid.pdf", g]

I found out that instead of 72 I have to use (probably) 96 and still have to adjust it by another empirical constant 8/7.7 which was figured out from my first printed paper that was not the correct size.

So is there a universal proper method of printing graphics objects "scaled to the real world" in Mathematica?

$\endgroup$
2
  • $\begingroup$ To be specific, I mean this answer: How to work always in WYSIWYG mode? $\endgroup$
    – xzczd
    Nov 18, 2022 at 13:03
  • $\begingroup$ A cheap solution is to create a rectangle: rect on screen and print it using "PrintSelection". Then measure the printed rectangle and scale the original rectangle so that the printed rectangle has the right size. $\endgroup$ Nov 19, 2022 at 12:16

0

Browse other questions tagged or ask your own question.