Resaving Acrobat Forms in the Browser

Convert Acrobat Forms and Resave (XFA to HTML5 left, Acrobat Right)

Convert Acrobat Forms and Resave (XFA to HTML5 left, Acrobat Right)

With the removal of Acrobat Reader support in Chrome and other browsers, we have seen a big increase in the number of clients asking about this.

What we do is convert the Acrobat Forms (FDF and XFA) to HTML5 forms (converting all the PDF form elements into HTML5 Form components). This works really well as a way to display an Acrobat Form on mobile, with no software requirement beyond that of a browser.  But that then raises the question of how you can use and save any changes to the forms data.

The Acrobat Form file still works very well as a single, self-contained container which can be reused and easily distributed. So we decided the obvious thing was to complete the cycle, by not only converting Acrobat forms to HTML5 but then allowing the HTML5 document to save the data back into the Acrobat Form.

XFA is actually easier to save back to the PDF file because the XFA data is very clearly separated out and structured. The PDF format makes it easy to rewrite objects to update them with changes. So we have added this already using JavaScript.

FDF is more complex because the data is not so clearly separated out in the PDF file which means it is taking a little longer to add in.

Converting Acrobat Forms into HTML5 Forms which can then update the PDF file works very well as a solution for displaying Forms on both mobile and desktop. If you want to try our solution, you can see it in action in our Acrobat Forms examples.

And if you want to understand the technical complexities involved in saving Acrobat Forms, my colleague Sam has a technical article on how to resave forms and we have a whole series of articles on Understanding the PDF File Format.

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (TwitterFacebook and Google+) or the  Blog RSS.

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

4 thoughts on “Resaving Acrobat Forms in the Browser

  1. Larry Evans

    I tried the online conversion for the 2015 f1040.pdf:

    https://www.irs.gov/pub/irs-pdf/f1040.pdf

    However, the resulting .html file would not allow any
    entry in the dollar columns of lines 7 and 8a. It would
    only allow entry in the cents columns.

    Are the any plans to correct this?

    TIA.

    -regards,
    Larry

    • Hi Larry,

      Yes there are plans to correct it, Its in our Bug database, but low down in the list.
      We are happy to prioritize it if you are a server license customer just submit a bug request with your customer ID.
      If you have any further questions or wish to raise any support related queries you can use our Support Forms at: https://support.idrsolutions.com/

      • Larry Evans

        After some minor experimental editing of the 1.html file indicated that changing
        the left attribute of inline css stylesheet. For example, for, in 1.html, there was:

        #topmostSubform0-Page10-f1_350{z-index:2;position:
        absolute;left:737px;top:530px;width:110px;
        height:15px;color: rgb(0,0,128); text-align:right;
        background: transparent;border-color:transparent;
        font:bold 12px Helvetica, Arial, sans-serif;}

        when that was changed to left:735px, then the cursor ended up
        in the right field. Before, the cursor *looked* like it was in
        the cents field for line7; however, it actually was in the
        dollar field for line7.

        HTH finding the error.

        -regards,
        Larry

  2. Thanks Larry,

    I have added as an item to investigate.

    Regards,

    MArk

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>