4 Replies Latest reply on Nov 8, 2017 6:25 AM by daves95694859

    Get Page Metadata from PDF document

    daves95694859 Level 1

      Hi all

       

      I'm trying to get the Page metadata out of a PDF imported into Illustrator, but haven't been able to find methods that allow me to do that in the Illustrator SDK.

      I've managed to get the Document metadata using the AIDocumentSuite::GetDocumentXAP method, but can not find a way of getting hold of the page, let alone extract the page metadata from it. Is this possible using this SDK? Any help would be appreciated.

        • 1. Re: Get Page Metadata from PDF document
          LeoTaro Level 4

          What meta data are you looking for? If you open your pdf in Illustrator and then save as a pdf, is the meta data still there?

          • 2. Re: Get Page Metadata from PDF document
            daves95694859 Level 1

            We're hoping to add Custom Page metadata (rather than Document) to the PDF exporter of our main application which could then be read by our Illustrator plugin. We have managed to get it written, and we can verify this by looking at the generated PDF in a text editor. When we save the PDF again from Illustrator the metadata is there though it appears to have been encoded in some way as you can't find it in a text editor, but our Importer can still read the Page Metadata. Our Importer and Exporter use the Adobe PDF Library, but I was hoping there would be a way of reading the page metadata with just the Illustrator SDK.

            • 3. Re: Get Page Metadata from PDF document
              LeoTaro Level 4

              Illustrator will compress the pdf output by default. If you turn off the compression options when saving as pdf, you may be able to see your meta data in a text editor.

               

              So you could achieve what you want to do using the document meta data, but would rather do it with the page meta data?

               

              There don't seem to be any other functions to get XAP data. I haven't used XAP data before so I don't know anything about it. I assume the page data is not contained in the document data somewhere?

              • 4. Re: Get Page Metadata from PDF document
                daves95694859 Level 1

                Thanks for the heads up, I'll give that a try.

                 

                As for the page metadata, it doesn't appear to be in the document metadata (the document metadata is unchanged regardless of whether we add the page metadata or not). And as you suggest, there doesn't appear to be any other functions to get XAP data. I guess we'll have to add it to the document meta data, which is shame. Thanks very much.