Skip to main content

export - Problem with Exporting Grid to PDF


Grid[ArrayReshape[ Item[#, Background ->  If[FreeQ[IntegerDigits@#, 3], White, Yellow]] & /@  Range@1000, {34, 30}], Dividers -> All] Export["1000-3.pdf", %]

The Grid looks fine on the screen in MMA. But when exported, it became this


enter image description here


The rest of the cells are all good part from the "fat" 1000.


enter image description here



Answer




Easy with ItemSize:


gr = Grid[ArrayReshape[Item[#, Background -> If[FreeQ[IntegerDigits@#, 3], White, Yellow]] 
& /@ Range@1000, {34, 30}], Dividers -> All, ItemSize -> All];
Export["1000-3.pdf", gr]

Comments