15 Replies Latest reply: Jan 27, 2014 3:34 AM by Stuck Mojo RSS

    in browser- URL of PDF where it imports FDF data

    JayP111 Community Member

      I want to bring up my browser - put the URL of a PDF on a server that has fillable fields - and have the PDF automatically bring in the contents of an FDF file to populate the fields defined in the FDF file.

       

      There is ADOBE documentation of doing something like this:
      http://www.mydomain.com/abc.pdf#fdf=datafile.fdf

       

      That's all I want to do.  Simple.

       

      In detail - in a PHP program I want to create the FDF file just using fopen and fwrites - no additional packages - then my JavaScript calls an already created PDF file on the web with the PDF when brought up on the server side automatically imports the FDF my program created a few seconds ago.

       

      I do know about fdf_create in PHP but unfortunately the server I'm on is cpanel based and the hosting company cannot load a library for fdf_create related calls.

       

      I cannot seem to get this working.  I've called Adobe tech support.  A few months ago I reached someone who actually said "You've reached the right person.  Yes that is doable." and they confirmed what I wanted to do.   But since then the Adobe people I call don't seem to understand what an FDF file is even though that is what Adobe uses to communicate and has it in their documentation as     http://......abc.pdf#fdf=xxx.fdf

       

      Now I've even eliminated the step/chance that I've not created my FDF file properly.  I've gone into Acrobat Pro and done an extract to an .FDF file.   Then I've tried  http://www.myweb.com/abc.pdf#fdf=theAcrobatExtractedFile.fdf  and it still ignores the contents of the FDF file.

       

      I've also tried http://www.myweb.com/abc.pdf#fdf=http://www.myweb.com/extractedfile.fdf   fully qualifying the location of the FDF file.

       

      Help!  This is important.   Thank you.

      Jay

        • 1. Re: in browser- URL of PDF where it imports FDF data
          olafdruemmer Community Member

          Your question could be addressed on three levels:

           

          [1] you seem to assume that the technology in the browser that handles the PDF is from Adobe, e.g. Adobe Reader taking care of PDFs opened in the browser; it is important to udnerstand that this is an assumption, and that assumption should be verified for doing any further research; so: are you sure that in your test setup it is actually Adobe Reader or Adobe Acrobat handling the PDF file in your browser window?

           

          [2] if you want this to work regardless what technology is handling  the PDF in the browser, you may want to prepopulate yur PDF with values from the FDF file; there are tools out there that can do that for you (I am not sure they are necessarily free of charge)

           

          [3] last but not least you have to make sure that the technology handling your PDF in the browser window is actually capable of offering form fields for filling; this is not necessarily true for all technologies that in principle can handle PDFs in browser windows.

           

          Adobe will probably only feel responsible for [1].

           

          Olaf

          • 2. Re: in browser- URL of PDF where it imports FDF data
            Test Screen Name CommunityMVP

            I suggest you are doing this backwards. Serve the FDF directly. In the FDF, put the URL of the PDF.

             

            If you are fortunate enough to have the user have FDF files handled by Adobe technology (decreasingly likely) this will open and fill the PDF.

            • 3. Re: in browser- URL of PDF where it imports FDF data
              JayP111 Community Member

              I appreciate the responses so far.

              I've been at this for a couple weeks now as I've had windows of time to try different things.

              I did find that if the URL went to the fdf instead of the PDF
              http://www.myweb.com/xyz.fdf   then it would say "your Adobe Reader is not current do you want to update the reader or continue" and I would say "continue" and then it would bring up the actual PDF file but not fill in the fields.  So going that direction it was looking inside the FDF file and seeing the  /F  parameter for the PDF file to use but it was not populating the fields defined in the the FDF that matched the fields in the PDF.   I then thought - let's update the Adobe Reader - but when I did that it acted differently in that now if I do the FDF in the browser it now brings up Adobe Reader locally so it can't find the PDF locally which is actually on the server.  So as I may have been very close before, now updating my Adobe Reader, when I URL the remote FDF  the new Adobe Reader runs locally and can't see the server side PDF and so is keeping me from directly calling the server side PDF.  Pulling my hair out.....

              • 4. Re: in browser- URL of PDF where it imports FDF data
                Test Screen Name CommunityMVP

                What is saying "your Adobe Reader is not current do you want to update the reader or continue" ? Adobe Reader doesn't say that, I think.

                • 5. Re: in browser- URL of PDF where it imports FDF data
                  JayP111 Community Member

                  I appreciate your help.  My Chrome brower was saying that.

                   

                  I started this quest of FDF into PDF because I had done it years ago successfully and because the Adobe Tech Support fellow told me that still worked (http://www.myweb.com/abc.PDF#fdf=xyz.FDF ) when I called him last October.  But let me pose the question in a different way  - is there a datafile (any format) that I can use as a parameter to a URL that is of a PDF?  XML, flat file, GIFF format, csv, pipe delimited, etc.   If there is a data file that I can do
                  http://www.myweb.com/document.PDF#inputdata=filex   -or- another way to pose the question - if I'm going from PHP to browser PDF is there an example of calling the PDF from PHP where it loads PDF and data values from an outside source.... doing this without involving any other system/package?  Just PDF in a browser.

                   

                  The fdftk library for PHP is not accessible in my normally used host and also GoDaddy said they wouldn't load fdftk either.

                   

                  Note: If you go to the last page of this Adobe document:

                  http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf

                  you'll see their example http://example.org/doc.pdf#fdf=http://example.org/doc.fdf

                   

                  Thanks!  Help!

                  • 6. Re: in browser- URL of PDF where it imports FDF data
                    Test Screen Name CommunityMVP

                    Chrome mostly doesn't use Adobe Reader. Sometimes it will, but under its own terms. Just not likely to work. It your first test it may not be touching Adobe technology.

                     

                    In fact, it is getting less and less likely you can use either method to fill a PDF.

                     

                    Of course, these are documented methods and shouldn't be tied to Adobe Reader but other vendors don't follow slavishly. And consider Windows 8, with built in Microsoft Reader which opens a Metro app, not in any kind of window...

                     

                    I think we have to abandon the idea of client side filling unless you can dictate the technology (i.e. personal use or some corporates).

                    • 7. Re: in browser- URL of PDF where it imports FDF data
                      JayP111 Community Member

                      Well it seems like a closing door - but the data and the PDF are both on the server side.  All I want to do is for the PDF being looked at by a browser to input some data fields without human intervention.  That seems pretty basic for a product.

                       

                      Even a bizarre idea like the old keystroke program that would let you buffer data then populate something as if it came from the keyboard to populate a PDF form.

                      • 8. Re: in browser- URL of PDF where it imports FDF data
                        lrosenth Adobe Employee

                        Jay - we (Adobe) agrees with you that all PDF viewers should follow the standards and when they receive an FDF file they should fill in the data.   That is what the PDF standard recommends and what the Adobe products have been doing for almost 20 years.

                         

                        HOWEVER, the fact is that many users aren't using (or can't use, in the case of mobile device) the Adobe Reader for viewing PDFs inside their browser. In those case, the PDF viewer in question - whether Chrome, FireFox, Apple Preview, etc. - DO NOT do what you are asking, and so you get the (unfortunate) results that you do.

                         

                        It's not a PDF problem or an Adobe issue.  It's an issue for all the implementors :(.

                         

                        I would recommend that you take your requirements to Google, FireFox, Apple, etc.

                         

                        OR do what was recommend, which is to switch to a solution that will work for all clients - server-side merging!

                        • 9. Re: in browser- URL of PDF where it imports FDF data
                          JayP111 Community Member

                          I appreciate hearing from you. 

                          I am open to server side merging but at the moment I don't know what that entails outside of what I'm currently doing.  The program that collects the data is on the server side (PHP/Linux) and the PDF is on the server side.  So can you list links to examples and explanations of what I need to do?  Is there a program my server side PHP can run that merges server side FDF data with a server side PDF and results in a new PDF that someone out in the world can view?

                           

                          I have an official multi-page document that is in PDF form on a server with fields to fill out.  The end user fills in this data in other applications before they get to the PDF  -data residing on the server side.  I'm trying to keep the end user from having to reenter everything twice.  The end result needs to be that official document (PDF) filled out so the end user can print it out.

                           

                           

                          So if PDF standard is based on FDF format - how can I programmatically import an FDF file into a PDF when not using a browser for the end user out there in the world to pull up and see their data already populated?   I'm really in need here.  Thank you.

                          • 10. Re: in browser- URL of PDF where it imports FDF data
                            olafdruemmer Community Member

                            FDFMerge from Appligent comes to mind:

                             

                            http://www.appligent.com/server-software/fdfmerge/

                             

                            I do not know whether there are any free of charge / open source tools.

                            • 11. Re: in browser- URL of PDF where it imports FDF data
                              Stuck Mojo Community Member

                              To populate form fields without leaving PHP you may find this interesting, too: http://www.setasign.com/products/setapdf-formfiller/details/

                              • 12. Re: in browser- URL of PDF where it imports FDF data
                                Test Screen Name CommunityMVP

                                It may be worth noting that for edits like this, all third party (non Adobe) tools, and some Adobe tools, will invalidate Reader Enabling of a PDF.

                                • 13. Re: in browser- URL of PDF where it imports FDF data
                                  Stuck Mojo Community Member

                                  This is not true. The rights will only get invalid if specific content is changed. Changing form field values will not affect this.

                                  • 14. Re: in browser- URL of PDF where it imports FDF data
                                    Test Screen Name CommunityMVP

                                    Interesting. However, while that may be true in theory - there may well be a way to change the form fields without invalidating Enabling - my experience of a lot of forum posts and people using multiple tools is that this DOES break the Enabling. For example, many tools will do a full save, which will surely destroy the signature on which it is based.  However, there may be third party tools specifically designed to work within the spec, which would be good news. Can you confirm any specific ones?

                                    • 15. Re: in browser- URL of PDF where it imports FDF data
                                      Stuck Mojo Community Member

                                      A full save will destroy the signature, sure. The SetaPDF-FormFiller is able to handle rights enabled documents: http://www.setasign.com/products/setapdf-formfiller/demos/fill-in-a-reader-enabled-documen t/