3 Replies Latest reply on May 11, 2009 2:19 PM by Patrick Leckey

    Capture Coordinates of All Content with a PDF

    rolwing Level 1

      Is it possible to have a script extract the coordinates of all content - mostly vector paths (lines and curves) from specific layers of a pdf and to export that information to an XML file? I would also need it to include the color and lineweight information.

       

      I have noticed comments where you can get the quadrants of text using "getPageNthWordQuads."  I am looking for something similar where I can extract all paths, lines, shapes and other objects within the pdf.  This can be achieved in Adobe Illustrator using a script but I am looking for something web-based if possible.

       

      Thanks,

      Rebecca

        • 1. Re: Capture Coordinates of All Content with a PDF
          Patrick Leckey Level 3

          No, this level of access cannot be achieved with Acrobat JavaScript.  You would need to write a plug-in in C/C++ to accomplish this.

          • 2. Re: Capture Coordinates of All Content with a PDF
            rolwing Level 1

            Hi Patrick,

             

            Thanks for the suggestion.  Do you know if I would be able to capture the coordinates of a PDF document using ActionScript 3.0?  I see that the latest version of Acrobat accomodates ActionScript and my goal is to be able to integrate this information into Flash.

             

            Thanks,

            Rebecca

            • 3. Re: Capture Coordinates of All Content with a PDF
              Patrick Leckey Level 3

              Actually Acrobat doesn't handle ActionScript in the way you seem to be suggesting - you can't script at the document-level with AS like you can with JavaScript.  Acrobat now comes with an embedded Flash engine which will allow you to render document-level Falsh content even if the client machine doesn't have Flash Player installed, and also allows you to interact with the Flash content but you cannot simply write script in AS and embed that in a PDF.  None of the interfaces that you can import into your Flash content to interact with the PDF will allow you this level of access either.

               

              As I mentioned earlier, the only way you could do this is with a plug-in written in C/C++.