Synapse has a PDF Forms facility that was written a while back. It differs from Acroforms which uses Acrobat form technology. Instead it uses a bitmap image of the PDF which you then place text on to, then Synapse merges the changes with the original PDF (actually EPS ). Because the govt here changes my forms monthly it is becoming way too much work to update Acroforms so I am looking to use PDF forms again. Here's an introduction on how to create the files needed Extract the PDF page you need if it's a multi-page PDF. You can use PDFTK for this .. just google where to download it. So the following command will split the PDF into separate single page PDFs pdftk input.pdf burst Create the PNG image of the PDF that Synapse will put text on to gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 -sOutputFile=tiger.png tiger.pdf Create the EPS version of the same PDF gswin32c -o tiger.eps -sDEVICE=epswrite tiger.pdf Copy both of these files ( tiger.eps and tiger.png ) to the Synapse directory, and then create the fields needed in Settings/Forms/PDFForms
And here's a script to automate that process Code: Rebol [ title: "PDF Forms Utility" author: "Graham Chiu" rights: 'BSD date: 16-Sep-2012 file: %pdf-forms-util.r purpose: { downloads a PDF, splits into single pages, and creates PNG and EPS versions for each page numbering them as 1 .. n Needs ghostscript and PDFTK installed } ] sources: [ http://www.pharmac.govt.nz/2012/09/01/SA1187.pdf http://www.pharmac.govt.nz/2012/09/01/SA1157.pdf ] foreach link sources [ cnt: 1 print rejoin [ "Downloading " link " now" ] pdf: last split-path link root: copy/part pdf find pdf %.pdf write/binary pdf read/binary link ; remove all previous pages attempt [ delete pg_*.pdf ] print "bursting" call/wait rejoin [ "pdftk " pdf " burst" ] ; now convert each of the pages created forever [ either exists? single-pdf: rejoin [ %pg_ next form 10000 + cnt %.pdf ] [ print rejoin [ "creating " root "-" cnt %.png ] script: rejoin [ "gswin32c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 -sOutputFile=" rejoin [ root "-" cnt %.png ] " " single-pdf ] call/wait script print rejoin [ "creating EPS " root "-" cnt %.eps ] script: rejoin [ "gswin32c -o " rejoin [ root "-" cnt %.eps ] " -sPAPERSIZE=a4 -sDEVICE=epswrite " single-pdf ] call/wait script cnt: cnt + 1 ][ ; no page, so go to next download break ] ] ] print "Run finished" halt
This works for single page forms .... is that what you want? If multipage, you'll have to do each page separately or use acroforms
On a separate question, From this directory, I run gswin64c.exe as administrator ... and I get this ... From this gs window, How do I do these two commands from this window ? gswin64c -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r300 -sOutputFile=stlimaging.png stlimaging.pdf gswin64c -o tiger.eps -sDEVICE=epswrite tiger.pdf I get this back.
Jason, it appears you're working on an imaging requisition form. Could you attach a copy of it ? I would like to see if I can get that working as an acroform as well as seeing how the PDF/scan control overlay method works for me.
Hopefully I haven't hard coded in "gswin32c" but who knows? I may have. In which case, copy gswin64c.exe to gswin32c.exe, and make sure it's available in your system path. Type at a command prompt path to see if it shows up. Cheers
I'm trying it manually anyway. I'm not running the rebol script. Although I think I did buy a license to do that many moons ago.
When I print form only I get this: but the file is there. I'm going to reboot this PC to see if that helps. The pre-printed form looks good. (see below) The Print Form & Content only shows the first item [Doctor] I made the .eps many years ago and it might be bad.
I was able to make a png from the pdf. It appears that there was a permission error to write files. I moved gswin64c and the files to my e:\ drive and the file was generated. trying to make the .eps gives me this ... GPL Ghostscript 9.16 (2015-03-30) Copyright (C) 2015 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. Unknown device: epswrite Unrecoverable error: syntaxerror in --nostringval-- Operand stack: defaultdevice false Unrecoverable error: undefined in .uninstallpagedevice Operand stack: defaultdevice false
Not sure. It's been a long time ago since I looked at this. You'll just have to try different values to see what impact it has on printing.