Reputation: 31
I'm written a program on a legacy app (Progress 4GL on SCO Unix 5.0.7 - - I know, I know) to generate a postscript file line by line. If I open the .ps file in PDFCreator, it renders everything just like I want.
But, I need to get it into pdf format. When I use ps2pdf to do that by:
ps2pdf mypsfile.ps newpdffile.pdf
and open the pdf in PDFCreator or Acrobat, I get a single blank page (expected output is one page).
If I chop the .ps file down to something that yields a simple one line output, I still get a blank .pdf page. This .ps also renders fine in PDFCreator:
/Arial findfont
12 scalefont
setfont
175 700 moveto
(ABC Company) show
showpage
ps2pdf isn't displaying any errors. Can someone tell me what I need to add to the .ps code above to have it correctly convert to a PDF?
This PDF becomes overlay text on 'top of' another PDF using pdftk. When I have two "good" PDF's, that part works fine as well. It's just the converting ps to pdf that I'm stuck on.
Thanks, David
Upvotes: 3
Views: 2272
Reputation: 31159
That ought to work fine. First question is 'which version of Ghostscript are you using ?' Have you tried using Ghostscript directly instead of using the ps2pdf script ? Something like
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=<output.pdf> <input.ps>
You haven't set a media size request, so its possible that GS is defaulting to Letter, and your text is simply off the top of the page. Try placing the text at 0,0 instead of 175, 700.
Upvotes: 2