1

I have an app dependent legacy environment running SCO Unix 5.0.7 that I can install Ghostscrip on.

Using a scanned form (lines, boxes, logo, etc) that I've stored as an image (could store it as PDF instead if that helps), I need to be able to (1) lay a unix text file "on top of" that form and (2) output the merged results as a PDF.

I'm a total noob with this and have searched and read till confusion. I'm sure I've seen parts of the solution, but can't connect the dots for what's (probably) pretty simple.

Can anyone please point me in the right direction with a 1, 2, 3 of the flow and maybe the apropriate ghostscript syntax?

Thanks, David

Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
David
  • 11
  • 1

1 Answers1

1
  1. Don't use Ghostscript for this. Use pdftk instead. (pdftk is Open Source and it should be possible to compile + install it on SCO [bah!] Unix).
  2. Store your scanned form as PDF, not as an image. Let's call this the masterform.pdf.
  3. Convert your unix text file to PDF. Make sure it has a transparent background. If you need help with that (esp. as far as hitting the correct spacing of characters is concerned so that the text matches the form fields: just ask another question on this website...). Let's call this the formdata.pdf.
  4. Now run this pdftk command (I'm assuming 1-page PDF files):

    pdftk \
     masterform.pdf \
     stamp formdata.pdf \
     output result.pdf
    
Kurt Pfeifle
  • 86,724
  • 23
  • 248
  • 345
  • Thanks Pipitas, that helps. Not sure it's the best way, but I've been able to get my unix text into PS using a2ps and then into pdf using ghostscript ps2pdf. I haven't tried the transparency part yet. I had found pdftk was a great tool for doing what I wanted (saw one of your posts describing this scenario), but felt stymied when I couldn't find a version for SCO (I know, I know :-) ) . Compiling against the O/S is something I've never done, but I'll dive in and see if I can figure out what tools I need to download and then how to go about it. – David May 27 '11 at 13:04