Graph Paper in Postscript

Sometimes I need a few sheets of paper with an uncommon pattern, such as 1 mm squares or an isometric grid. Usually I could spend maybe an hour looking for a surviving stationery store and buy some, but I'm programmer-lazy and back in 2004 I sat down and spent a couple of hours writing a postscript program that printed what I needed, so that when I required something similar I could just spend 5 minutes tweaking a few parameters. This happened a few times, and here are a few such programs.

For convenience, I have generated a few PDF files with common options, and they are available in the downloads section as well. If you need any other format that can be generated from these sources, but you can't use the PS sources, feel free to drop me a line and I will try to add them to this page.

Instructions

PDF version

Simply download the file you want and open it with a PDF reader (it should happen on its own when you click on the link).

PostScript sources

Download the PostScript source below and save it locally. Open the file with a text editor and look for the line:

% ------ Settings -------------------------------------------------------------

in that section you'll find a few paramethers that can be used to tweak the result to your liking; just change the numeric values up to the line:

% From here on you shouldn't worry about changing or configuring anything

Now you have a few choices.

  • Send the file as is to a postscript printer, e.g. under linux with:

    $ lpr -l $FILE.ps
    
  • Convert the file to PDF:

    $ ps2pdf $FILE.ps
    
  • Open the file with a postscript interpreter; the traditional ghostview gives somewhat more helpful error messages if something goes wrong, but Okular (born for KDE under *nix systems, but available also for windows) is probably a more user friendly alternative if you just want to check and print the result.

License

Copyright (c) 2004-2011, Elena Grandi All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Send a comment: unless requested otherwise I may add it, or some extract, to this page.

Return to Top