%!PS-Adobe-3.0 % simple program to draw a grid on a postscript printer % set the size of the squares in mm (you can change the number) /size 100 def % page dimensions in mm (you can change this if not A4) /width 700 def /height 1200 def % should not need to change anything below this % set metric scale (10 printer units per mm) 72 254 div dup scale % convert sizes to printer units /width width 10 mul def /height height 10 mul def /size size 10 mul def % define procedures /verticals { newpath 0 size width { 0 moveto 0 height rlineto } for stroke } def /horizontals { newpath 0 size height { 0 exch moveto width 0 rlineto } for stroke } def % draw the grid verticals horizontals % print it showpage