8 Replies Latest reply on Mar 17, 2009 12:27 PM by neptas

    get the structure of a pdf

    neptas Level 1
      Hello,

      I have a blank pdf form. What is the best approch to get the xml field structure of the form, similar to that livecycle designer does in the preview option, but without assigning values to the fiels?

      thank you
        • 1. Re: get the structure of a pdf
          pguerett Level 6
          It depends on how that form was created in the first place. You could import the PDF into Designer and it will change the structure into an XFA format for you (hence giving you the structure).
          • 2. Re: get the structure of a pdf
            neptas Level 1
            Hi,

            The form was created in the designer. I would like to get that structure using livecycle process. Please note that I don´t want all the xfa structure, but only the data part (from a pdf without data value assigned to it).

            Thank you
            • 3. Re: get the structure of a pdf
              pguerett Level 6
              Ah...now I understand ....if you built the form with a schema definition you can import the schema into the xfaForm variable and the xPath builder will allow you to navigate down to indivuidual node items (thus showing you the structure). If no schema was used then the xPath builder will not know of the stucture (it will still exist) and you as a process developer will have to indicate the path to the nodes (or you can use the // notation to do a search).
              • 4. Re: get the structure of a pdf
                neptas Level 1
                Paul,

                I appreciate you help, but that was not what I was trying to accomplish :(
                What I want is to get the hierarchy of all the fields inside a PDF. If you generate a random data file using the preview tab in livecycle designer, you will get what I need.
                • 5. Re: get the structure of a pdf
                  pguerett Level 6
                  What if you merely exported a data file ...then the file will have the structure as well as any data that you have entered into the form. You can export data in Acrobat by using the Forms/Manage Form Data/Export Data option. This will create an xml file that has the structure of the data as you defined it in Designer or using the structure of the schema (if you are using one).
                  • 6. Re: get the structure of a pdf
                    neptas Level 1
                    Paul,

                    I will not use Acrobat, just reader and workbench. Plus, I would want to turn this step automatic, and not to have someone exporting the file by hand. What I was hopping was that there would be a component in workbench that would output something like Acrobat/Designer does...

                    thank you
                    • 7. Re: get the structure of a pdf
                      pguerett Level 6
                      Depending on which option of LiveCycle you bought there are services in the Common folder that allow you to extract data from a PDF. Look under the Form Data Integration service and there is an export Data operation there. It is simple to use, pass the form as a dcument variable and the data will come out as a document as well. Then you can use a SetValue to equate an XML var to the Doc var and now you have the xml you seek.
                      • 8. Re: get the structure of a pdf
                        neptas Level 1
                        Paul,

                        Unfortunatly it doesn´t work. Because my pdf is empty (it does not have anything inside the xfa:data structure, yet), the component will not create the tree for the fields in the form.

                        Thank you