2
$\begingroup$

I am trying to save (export) to PDF.

Grid[Partition[Range@100, 10], ItemSize -> {3, 3}, Dividers -> All,  Alignment -> {Center, Center}]
Export["100.pdf", %]

On screen, it looks square. enter image description here

But then exported PDF enter image description here

not square.

If I just save as PDF from the notebook, enter image description here also not square.

How can I export the grid as it looks?

OS: Windows 7 X64
Mathematica: X64 11.3
$\endgroup$
  • $\begingroup$ On screen each item is actually {49, 43} pixels for me (Win7 64, Mma 11.3) $\endgroup$ – rhermans Jul 1 '18 at 17:09
  • 2
    $\begingroup$ ItemSize -> {Scaled[.05], Scaled[.05]} gives square cells (v9 windows 10-64bit). $\endgroup$ – kglr Jul 1 '18 at 17:17
  • $\begingroup$ @rhermans I think it's the same for me, that's why i said it looks (like) square... $\endgroup$ – Chen Stats Yu Jul 1 '18 at 17:29
  • $\begingroup$ @kglr Does it export/save and squares in PDF? My problem is that only is only a square when you look at it on screen, but does not stay like square when saved to PDF ... wired... $\endgroup$ – Chen Stats Yu Jul 1 '18 at 17:33
  • 1
    $\begingroup$ @rhermans @kglr Note that an explicit width in ItemSize within Grid is measured in ems and explicit height in line heights. Since the two can be different, specifying the same number of two different units doesn’t necessarily give a square aspect ratio. $\endgroup$ – MarcoB Jul 1 '18 at 20:05

Your Answer

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

Browse other questions tagged or ask your own question.