in reply to Making ruled paper
I tend to generate PostScript code (by hand or using perl) then, if necessary, convert the result to PDF.
Good Day, Dean