Acrobat PDF forms

Discussion in 'Feature: Requests and Planning' started by Graham, Mar 3, 2009.

  1. Graham

    Graham Developer Staff Member

    Jerry has a requirement to fill in scores of PDF forms. The Synapse way of doing PDFs would be too time consuming for him.

    This is a possible workflow, which requires Adobe LiveCycle designer or similar:
    1. Locate User
    2. Bring up an applet that displays all the forms in the system ( residing on a mapped network drive )
    3. Click on the required form
    4. A templated XFDF file associated with that form is downloaded to the client
    5. The client then runs acrobat on the XFDF and fills in some default values
    6. User fills in rest
    7. User submits the form to Cheyenne ( Physcian web portal version )
    8. A script pulls out the identifying number that links this submission to the patient and stores the results. The identifying number should be unique? so that it can't be submitted again? The identifying number allows us also to know which form this is. That way we only ever need a single server side script to process any type of form.
    9. Later on you can view all filled forms for that patient ... ie download the submitted data as an XFDF and recreate the filled in form

    The task for the user is to add two new fields on every PDF that they want to use
    viz, a "Submit" button that points to the physician web portal, and a unique form id, which will be hidden.

    Additionally the user has to generate the skeleton XFDF from the PDF, and place various template variables which they want Synapse to fill in.

    They have to upload the XFDF with a form description, and a link to where the form is.

  2. Jason

    Jason Developer / Handyman Staff Member

    Every Doctor in the Modern World has this requirement. American MDs likely do have more. ALOT MORE.


    I've tried to find a good solution for this - my best solution was getting you to do my Lab PDF form - it works Great. [:)]

    Doing this properly is good business for a Synapse user: Saved Time is Saved Money/Headache.
  3. Jerry

    Jerry Administrator Staff Member

    There are a lot of open source and proprietary PDF software tools. The essentials needed are:
    • Create PDF AcroForms with controls (like combo boxes, check boxes, and text boxes)
    • The ability to fill in data on a PDF AcroForm and save it.
    • Create FDF or more likely XFDF files (the data only in a small file -- Reader knows how to open the XFDF file, then open the PDF it points to and use the data to fill in the form).

    As usual, the slick software costs, but there are open source tools for every step, so it's not like incorporating PDF AcroForms into Synapse has to necessarily cost big bucks. I realize this it a big project. I've been thinking about it for years. I don't see all this plethora of paper and computer forms going away on the US medical scene anytime soon, so we are forced to deal with it. Googling around, it appears that a good deal of the EMR scan-paper-form-to-EMR-form softwares that exist are add-ons, so apparently there is a real need for this that the EMR companies are not filling.

    My ideas have been shaped by using OmniForm for a long time. It scans in paper forms and does a bang-up fast job of turning them into computer forms IMHO. I figure, "Why reinvent the wheel?"

    I don't want to take away any momentum from the new Synapse Physician Web Portal - that's more foundational, but I would like to see if it's possible to add PDF AcroForms to what Synapse can do. Adobe's newer interation is XFA Forms, but from what I read they add more complexity. Maybe not, and that would be a question to be researched.
  4. Graham

    Graham Developer Staff Member

    Adobe Acrobat 9 doesn't seem to be able to create XFDF data ...but it can read it, and bring up the correct PDF.

    What would you use instead?
  5. Graham

    Graham Developer Staff Member

    Anyway this business of using acrobat forms is clearly not straight forward, and the success or otherwise depends on how easily the user can modify existing forms and the xfdf data.

  6. Jerry

    Jerry Administrator Staff Member

    Right, that's Acrobat Reader's (any version) big "gottcha". It will open an AcroForm, and alllow you to fill it in and print it, but you can't save the data on/with the form. No "Save" function after you fill out the form, just save a copy of the blank form to your local hard drive. Lots of proprietory softwares at all levels of expense will do the "Save" function (i.e., save the form with the data one it). One free but kloogy, another open source and less kloogy program will do it too. Of course, Acrobat Reader allows the "SUBMIT" button, so you can send the data from an AcroForm to a web server as we have been working on. We could get into a long discussion here of the various softwares I have used that do the "Save" function, their various merits and expense. There's also a wide variety of PDF creation/editing tools as well. But I think the first big decision is how the flow of information will work best for Synapse, then we can likely find PDF software tools to fit the need.
  7. Graham

    Graham Developer Staff Member

    Sorry, I am using Acrobat pro which does allow me to save. It allows me to export the data in two formats as well, just not XFDF which I think is deprecated.

    So, what software will you use to create the XFDF ? ( It can be done by hand just tedious ).

  8. Jerry

    Jerry Administrator Staff Member



    My favorite app for XFDF creation is Cute PDF Filler Pro. Well worth the $50. It exports to FDF/XFDF, and will do a lot of PDF editing, even adding PDF controls like combo boxes and such on an existing PDF. For open source, PDFBox works well. It's Java and .NET, and is command line. The only little annoyance I have with it is that it does not automatically create a reference to the PDF AcroForm that was used to create the XFDF... have to do that manually, and you have to put some sample data in all the parent AcroForm fields for them to be included in the resultant XFDF file. PDFBox has some other very good PDF manipulation tools, as does another open source command line program called pdftk. pdftk creates only FDF at my last check, but has a front-end GUI for both Windows and Linux that is very handy.
  9. Graham

    Graham Developer Staff Member

    I spent about 4 hours on this and didn't get very far.

    I downloaded and installed the demo version of Adobe LiveCycle Design. I created a simple PDF form, and attached a submit button to it. I was successful in sending the data to the web server.

    But I then discovered that the PDFs created by LiveCycle are incompatible with XFDF. You have to use XDP, but loading that does not populate the form. Strike LiveCycle.

    I then looked at PDFBox, but the online documentation is unclear as to what you can do ... so I gave that a miss.

    I then downloaded Cute PDF Pro and Fillter demo versions. I loaded up the form I created in Livecycle and modified it with Cute PDF. It did not load in the submit button's action, and I set this to point to my web server. I had to change the data to HTML and not XFDF. I then used Cute PDF Filler to submit the form to the website, and that worked okay.

    Filler would not allow me to export the form as XFDF ( only XML in the demo version :( )

    So, I hand created an XFDF, and using this, this loaded up my PDF with the fields filled ... but Acrobat Pro will no longer submit this form!!

    The submit buttons for Cute PDF Pro and Acrobat LiveCyle appear to be different.

    So Jerry, to make any progress here, I think you need to show us how to create a PDF with a HTML submit that will work with XFDF, and also will work with Acrobat reader. Otherwise, everyone will be forced to use Cute PDF filler, and I suspect that this will cause problems with viewing ordinary PDFs ....

  10. Graham

    Graham Developer Staff Member

    An update.

    Can you create a new PDF in CutePDF? I took a blank PDF and added a couple of fields again in CutePDF. And a submit button.

    This form now works both in Filler and Acrobat.

    I guess it all depends on how the PDF was first created ... by which program.
  11. Graham

    Graham Developer Staff Member

    Ok, some luck.

    Try this: http://www.compkarori.co.nz:8000

    Login.. locate a patient .. you should see a menu item below the table of visits on the left that says "Test PDF"

    Click on it ... and it will send the xfdf data to the browser. The xfdf points to a PDF on my site, and downloads it, and fills it in with the patient name.

    It doesn't work with Chrome though.
  12. Graham

    Graham Developer Staff Member

    Looks like I need to randomize the url in the xfdf to stop Acrobat or the browser caching the data.
  13. Jason

    Jason Developer / Handyman Staff Member

    Which products are need to make an interactive PDF ?

    Attached Files:

  14. Jerry

    Jerry Administrator Staff Member

    I've noticed that applications that create PDF AcroForms often have different ways of accomplishing the same action, which sometimes makes the code not interoperative between them. Reader sometimes won't parse the data or perform the action requested if the syntax isn't what it expected. Not sure about using code for a Submit button created by Cute PDF Pro on a PDF AcroForm created by OmniForm, but apparently it didn't work for you so far. I noticed that I could save the small PDF created by OmniForm with a text editor and it would work OK, in spite of the small bit of binary code in the header, but some PDF's with more binary code have to have any code that has been added saved with a hex editor or the file won't launch in Acrobat Reader any more.
  15. Jason

    Jason Developer / Handyman Staff Member

    Filled in the patient's name

    Attached Files:

  16. Jerry

    Jerry Administrator Staff Member

    Your test PDF worked fine for me. I put user Baad, Bob in the blanks, here's what my brower returned:

    [TextField1 "Bob" TextField2 "Baad" syupdfid "" Submit ""]
    <hr />

    <table>
    <tbody>
    <tr>
    <th>Field Name </th>
    <th>Value </th>
    <th>Passed? </th></tr>
    <tr>
    <td>TextField1 </td>
    <td>Bob </td>
    <td>false </td></tr>
    <tr>
    <td>TextField2 </td>
    <td>Baad </td>
    <td>false </td></tr>
    <tr>
    <td>Submit </td>
    <td></td>
    <td>false </td></tr></tbody></table>You have used some unknown template
    variables. Try again.

    Processed in : < 1 ms.
  17. Jason

    Jason Developer / Handyman Staff Member

    What are some examples ?

    Are you going to be faxing it ? emailing it ?

    What is your proposed workflow here ?

    Will you be filling it out ? Your staff ? Both ?

    Is the patient in the office ?

    I'd like to know your needs, so I can see what the scope / plan of this PDF project is.

    Forinstance, for my lab form, I move to the LAB Tab and Press Print and the patient's info appears on a .pdf form, in the browser. (or Ghostscript). Is that enough ?
  18. Jason

    Jason Developer / Handyman Staff Member

    Note:

    UPDATE 2008-11-13: I
    got an email from someone recently who was creating his editable form
    using LiveCycle Designer. It turns out that if you use LiveCycle
    Designer to build your form, it won't work with XFDF. If you want to
    use XFDF, you have to create the form using Acrobat. LiveCycle
    Designer forms require that you use XDP (which I have never used). You
    can read a bit more about the incompatibilitieshere.

    http://lukerymarz.blogspot.com/2008/10/adobe-xfdf.html
  19. Graham

    Graham Developer Staff Member

    Looks like the xfdf is working for everyone.

    I'll let Jerry comment on his requirements ..

    I think you just need to get CutePDF Pro which is about $50. That allows you to turn an existing PDF into an interactive form with a submit button.

  20. Jason

    Jason Developer / Handyman Staff Member

Share This Page