Guest guest Posted January 4, 2008 Report Share Posted January 4, 2008 Graham, Here is a little mini-treatise on using PDF AcroForms. I would post this an attached file somewhere, but I'm not sure where. Maybe someone else will benefit from a more detailed description of how to work with PDF AcroForms as well. I am probably reviewing a lot of stuff you already know, but bear with me. I reviewed your tutorial on how to create forms with SynapseDirect. If I understand it correctly, SynapseDirect is using coordinates (likely 1/72 inch increments) and some internal programming to overlay checkmarks or text on a transformed PDF orginal. uses a very similar program that has been around for awhile called ReportLab (which uses some python programming) to overlay text onto a PDF orginal in Tkfp. He uses this to create CMS 1500 bills and it works pretty well. He said it was extremely labor intensive to get the CMS 1500 form working correctly. The exact position of the lines and marks is crucial, as the billing clearing houses scan the form and if it doesn't scan correctly you won't get paid. The examples on the SynapseDirect website are fairly simple forms. I count well over 200 datafields on the CMS 1500 form. Creating an overlay for a form of this magnitude is a lot of work. We deal with many such complex forms in urgent care. The method of using PDF AcroForms that has been referring to is much easier for complex forms. The CMS 1500 form as obtained from the Washington State goverment site is a fillable PDF AcroForm to use as an example: http://www.lni.wa.gov/Forms/pdf/245127af.pdf The data the user types into a PDF AcroForm can be saved to a small data only file in one of two formats. The first is called FDF and looks much like the field descriptions in the PDF file itself if you look at it with a text editor or a hex editor. The second is called XFDF and is pretty much straight forward XML. If you launch one of these FDF or XML files with Acrobat Reader and it contains the file reference to which PDF file it's data belongs to at the bottom of the file, Acrobat Reader will open the PDF file and automatically fill in the checkboxes, entry boxes, combo boxes and so forth with the values from the FDF or XFDF file. The fastest way I have found to create fillable PDF AcroForms is to print (from your word processor or whatever) or scan a form into a proprietary program called OmniForm. It will automatically OCR and design a fillable form for you (which you will want to edit, but is pretty accurate right " out of the gate " ) and save it to a PDF AcroForm. For a complex form with lots of entry fields and checkboxes, the time saving is enormous. A sidebar about OmniForm: I paid $150 for OmniForm verson 4 around 1999. It was from Caere corporation in Canada, and was " full versioned " , i.e, would save to PDF, RTF and so forth. ScanSoft purchased OmniForm (now Nuance Corp., I think). They are up to verson 5 now. It requires the " professional " version to save forms to PDF now, which costs about $700. Version 4 runs fine on Windows 98. If you can find an old copy it works very nearly as well as version 5. Acrobat Reader will not allow one to save the data only from a PDF AcroForm, or to save the form with the data on it, leaving the datafields active and usable. It will only allow to print the form after filling it out, not save it. Saving the PDF AcroForm with the data on it requires Acrobat Distiller or Acrobat Professional. There is an open source program that will do it however, called aipdf. I found it on sourceforge. It's in German, and is a java program, but it's interface is simple and easily understood. Once data is saved to the PDF AcroForm, it can be exported to FDF or XFDF files by pdftk or PDFBox, both open source. XFDF files are just plain text XML files so are easily created by programming as well. If you fill data in all the blanks of a PDF AcroForm, save it with aipdf, and then use the " ExportXFDF " command of PDFBox, it will create a fairly nicely formatted XFDF file for you, but without the file reference to PDF AcroForm at the bottom of the file. You have to add that manually. Other programs, like CutePDF Filler or PDFill on Windows will automatically add the file reference. PDFBox uses an open source library called iText that is used for parsing PDF files. Scribus creates high quality PDF AcroForm files. You can do the " overlay " method by opening an existing PDF in a graphics box, and stretch it to the page margins. Then overlay PDF " annotations " as they are called -- checkboxes, text entry fields, and combo boxes. It can then be saved with the overlying " annotations " , or the background PDF can be dropped out, leaving the datafields only (this would likely then be printed on pre-printed forms). If you don't mind designing a PDF AcroForm from the ground up, I highly recommend Scribus, but OpenOffice Writer will work too. Jerry > , > > I am in the process right now of writing a tutorial on how to this in > Synapse I'm about 1/3 of the way through. > > http://compkarori.no-ip.biz:8090/Documentation_Index/PDF_Forms > > I had sort of known about acrobat forms and xpdf etc, but found that > the forms I had tried were sluggish and hard to navigate .. part of > the PDF bloat I guess. > > So, I am trying it my way, and if that doesn't work .. will try Jerry's > > But one advantage of my method is that I can control the creation of > the PDF and archive it on the server automatically so that the user > will always have a copy of each form that they have filled in. > > > > > > form as well, and are open source. After the .pd form is created, he > > uses an open source command line program written in JAVA > > called " PDFBox " to produce a .xfdf file that corresponds to the .pdf > > form. Then we write our own little programs or what we call " scripts " in > > the Tcl/Tk programming language to extract data from the tkFP EMR > > to substitute into the .xfdf file and that allows us to fill out the .pdf > > forms automatically. We made one recently for the " Express > > Scripts " Rx refill form. I had previously used another method that was > > more labor intensive to get the CMS 1500 insurance claim form in > > a .pdf format for printing called " Report Lab " . I still use it for the CMS > > 1500 forms, but will use Jerry's methods for any new ones in the > > future. Have you used any of those methods? Or what are you using? > > Inquring minds want to know! > > > > Caldwell > > > > -- > Graham Chiu > http://www.synapsedirect.com > Synapse-EMR - innovative electronic medical records system > Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.