2
votes

Can someone provide me with an example of (or a link to) a postscript document for printing a simple 1 page (or multiple page) document. I need to use ps2pdf to generate a PDF from postscript since I cannot get TCPDF installed on a server I am using. So my only option is to generate the document in postscript and then send it to ps2pdf. So I am looking for an example of how to print a simple page with text in postscript. If you have another solution for my PDF problem, please let me know. Thank you

PS: The system here would not allow me to create the tag "ps2pdf". Can someone with a higher rating please create a tag for "ps2pdf" so it is easier for others to find information in the future. Thanks.

1
Are you building a document from scratch or trying to convert an existing document (and if the latter, what is the original format)? - Alan
you mean something like a2ps? - Stefan Hegny
For ps2pdf, use the Ghostscript tag. - KenS

1 Answers

6
votes

This is about as simple as you can get. Assuming your default page size for the PostScript converter is 8.5 x 11 (612pt x 792pt) the following PostScript code will print "Hello World" approximately one inch from the upper left of the page in 36 point Times Bold.

%!PS
/Times-Bold findfont 36 scalefont setfont
72 684 moveto (Hello World!) show
showpage