Acrobat PDF forms

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

  1. Graham

    Graham Developer Staff Member

    Don't ... it's 300Mb and you can't use to create PDFs that work with xfdf.

  2. Jason

    Jason Developer / Handyman Staff Member

    Mine must be a full demo version. It's 2.5gig.

    LifeCycle probably has it's own workflow and won't mesh with Synapse's workflow.


    I am reading about xfdf , why is it essential in your opinion ?
  3. Graham

    Graham Developer Staff Member

    Xfdf is one way of prepopulating a PDF which can be filled in by a remote web user and then submitted back to the server.

    The other way is to use Adobe's server software which is outside the domain we are in.

    There may be other ways I don't know of ... I think one of the plans for PDFBox is to be able to merge xfdf with a PDF and serve that .. but I don't know how far they have got with it.



  4. Jerry

    Jerry Administrator Staff Member

    Well, my sort-of ulterior motive here is that I have reams of forms in the urgent care business that have to be done.... in fact, most of what we do on paper gets put onto somebody's form. I have already made a lot of these forms into PDF AcroForms using OmniForm, so I have lots of working forns to show anyone who's interested. More on OmniForm later. There are also numerous PDF AcroForms that various entities (often government) have already made freely available on the web, such as the CMS 1500 form and theUS Post Office CA-17 form (their work restriction form) to name a couple of prominent examples. Not sure if these entities will start using XFA forms, but so far I doubt it, as the forms have to be retro-compatible with older versions of Acrobat Reader.

    The data from PDF AcroForms can be sent as email attachements. Not sure if anybody wants that right now, but maybe could be a handy feature, espcially for patients to fill out data on the patient portal or something and email it somewhere.

    Naturally, I would like to use PDF requisition forms... we have lots of different Physical Therapies, labs, etc. I could use a generic request form for everything, but some mail-order pharmacies and the like require use of their form only, and many othe entities do too.

    US HealthWorks uses paper templates with lots of checkboxes, and insists on their own forms. I have scanned most of these into AcroForms, and would like to use them for patient encounters. Eventually, it would be cool if I could use a tablet or maybe eeePC in the room with the patient because they can be mostly filled out with a stylus or mouse. We do not have PC's in patient rooms currently.
  5. Jerry

    Jerry Administrator Staff Member

    Let me make some brief observations about PDF softwares I have used:
    • Cute PDF Pro and Filler is cheap at $50 and has a lot of features. Windows only. Saves AcroForm field data to the file (the "Save" function that Reader doesn't have), and exports to PDF, XFDF, and FDF format.
    • PDFBox is a command line program that manipulates PDF files. Works with Java and .NET. I use it mainly for exporting data that has been "Saved" onto a PDF AcroForm to an XFDF file. Works really well. Will flatten PDF AcroForms, overlay one PDF onto another, and export a PDF file to text.
    • OmniForm I've mentioned several times before. Hands down the best for rapidly scanning a complicated form, OCR'ing it and auto-designing a new form that looks pretty much like the one you scanned in. Saves to HTML, PDF, and RTF if you get the Premium version 5 (Older versions didn't have Deluxe/Pro etc, and were a lot cheaper. Version 4 is very nearly as capable as 5 Premium, and cost me about $150 in 1999). OmniForm tends to use a bunch of Javascipt inside. Version 5 Premium is running around $699 on Nuance's website, but can be had for a lot cheaper if you look around. I can tell you lots more about OmniForm for anyone interested. I believe I can safely say that I know how to do just about everything that program will do.
    • Scribus is an open source desktop publishing program that makes top-notch PDF, including PDF AcroForms. Has Windows and Linux versions. I haven't tried their "Submit button" yet.
    There are lots more PDF manipulation programs to comment on .... PDF is a deep topic. I think Cute PDF Pro has a great feature set for the price, and unless you really need all the Acrobat Professional bells and whistles, it should suffice just fine.
  6. Graham

    Graham Developer Staff Member

    [quote user="jparkdo"]
    • PDFBox is a command line program that manipulates PDF files. Works with Java and .NET. I use it mainly for exporting data that has been "Saved" onto a PDF AcroForm to an XFDF file. Works really well. Will flatten PDF AcroForms, overlay one PDF onto another, and export a PDF file to text.

    [/quote]

    What's the difference then from loading the form into Cute PDF and then export to a XFDF?
  7. Graham

    Graham Developer Staff Member

    I have a new demonstration form.

    Jerry sent me a referral form with the xfdf. Even with this file, there are a lot of fields to go thru. So, I decided to write my own XFDF generator which seems to work.

    Anyway, select a demo patient. Then select the "referral" link below the "test pdf" link.

    It just has the patient demographics on the form.

    Clearly to be useful I need to create a lot more variables that can be used with forms ...as this requires employer's name, address etc.
  8. Graham

    Graham Developer Staff Member

    This is how it generates the xfdf file. Using Cute PDF Pro
    1. Take a pdf with fields on it.
    2. Create a read only field named "syupdfid" and leave its value blank
    3. Create a submit button, and make the action http and point to http://www.compkarori.co.nz:8000/md/public/process-pdf.rsp
    4. Load the pdf with Acrobat
    5. Fill in as many fields as we have variables
    6. Click the "submit" button and see the textarea for the xfdf created.

    In step 5, we can use any of the following:

    "$fname"
    "$surname"
    "$fullname"
    "$dob"
    "$age"
    "$address1"
    "$city"
    "$zip"
    "$ssn"
    "$homeph"
    "$date"


    So, where it asks for the patient's city in the PDF, you put $city.

    This allows us to replace $city later on with the patient's city address.

    If you get an error, or, it asks you to login, then using your browser, login to the website so that it can give you a session id.
  9. Graham

    Graham Developer Staff Member

    Ok, you can now add PDFs to your site.

    Try this ... login, and on the left patient navigation menu, go to "Acroforms"

    On the Admin tab, there is a link to Add Forms
  10. Graham

    Graham Developer Staff Member

    Video 1 - shows how to create a interactive form from a PDF and use it with the web portal and Synapse.

    Video 2 - 2nd part showing how the PDF is added to Synapse. Note that the actual PDF is copied to the PDFs directory on the web server separately.

    www/pdfs


    Video 3 - 3rd part showing the expected behavior on filling in a PDF form
  11. Graham

    Graham Developer Staff Member

    And you can now view forms that have been filled in before.

    I am going to add the ability to resubmit forms too ... for instance I have patients that I need to reapply for biologics every 6 months. so, I just change the date on the form.
  12. Graham

    Graham Developer Staff Member

    Seems if there is a "&" in the text of a field, it crashes the acrobat xml parser !

  13. Jason

    Jason Developer / Handyman Staff Member

    Where would a filled out .pdf appear in Synapse.exe ?

  14. Graham

    Graham Developer Staff Member

    The XFDF data is stored in remr.fdb, so it's just question of pulling it out and running it.

    That is the next step to be done.
  15. Graham

    Graham Developer Staff Member

    I've uploaded md090307.zip which is my current working distro.

    Note, that you have to upgrade the remr.fdb by using the latest synapse-server to create the acroform tables required.

    Now there are two customizations you have to do ...

    In www/md/fetchPDF.rsp, change the line

    myhost: copy "http://www.compkarori.co.nz:8000/pdfs"


    to your pdf location.

    Same again in www/md/retrieve-filled-pdf.rsp

    What this does is tell Acrobat where to download the pdf from.


    This will give you working Acroforms.


  16. Graham

    Graham Developer Staff Member

    I'm going to setup a global variable in app-init.r for myhost later on so that you will have only the one change to make.


  17. Graham

    Graham Developer Staff Member

    I've updated my version so that you edit the xfdf template ... basically go to admin -> Edit Acroform -> select a PDF -> make changes -> submit and get the xfdf data.

    Then add it again with the new XFDF data, but keep the same name in Admin/Add Acroform and it will update rather than add a new form.

    I need to make this easier but at least the functionality is present.
  18. Jason

    Jason Developer / Handyman Staff Member

    Would it be possible to have PDF forms generated from synapse.exe ?

    My Lab form is very useful.

    I've always wanted to do an Imaging Form (2 actually), a Bone Density Form, a Mammogram form, a colonoscopy form, etc.

    It might be useful to save these forms as well. Especially the Labs form, so I can see what I ordered.

    is this PDF technology available for synapse.exe ?
  19. Jason

    Jason Developer / Handyman Staff Member

    O I C

    sounds like it could be possible, but isn't currently. Thanks.
    Last edited: Jun 16, 2021
  20. Graham

    Graham Developer Staff Member

    You'll still need the Physician Web Portal running even if you just use Synapse client to bring up a PDF, because the PDF has to submit to a web server.

    The web server is also needed to add forms, edit them etc.



Share This Page