Javascript code to generate various types of graphpaper as PDF pages.