The Datalogics PDF WebAPI continues to add services and capabilities with the new DocumentProperties service. DocumentProperties is a utility function that will return a number of properties of the PDF file you sent with your request. By default, the request will return the basic metadata Title, Subject, Author, and Keywords just like in Adobe Acrobat as well as other metadata from the Document Properties Dialog such as the Creation and Modification dates, the application that created the PDF file, the PDF Producer, PDF Version and the number of pages in the file.
Additionally, by setting some options, you can discover if the file is a fillable form and what type (AcroForm or XFA) or if the file claims to be PDF/A compliant. You can even get the entire XMP object out of the PDF.
These properties can be interesting in and of themselves if you are trying to gather information about a group of PDF files but they can also be useful for other Datalogics WebAPI services.
For example, if you want to convert all of the pages of a PDF file to PNG images, you can use the RenderPages service to convert each page, page by page. Without knowing the number of pages in the file, you’d need to process pages until you get an error; that’s not really a clean solution. It’s also precisely why the Product Management team here at Datalogics asked for this service to be created. During the making of our RenderPages demo, it became clear that we had a gap in our offering and immediately started working on the solution… and now we have DocumentProperties.
A couple of other interesting applications of DocumentProperties in conjunction with other services would be to retrieve the document Title and add it to a footer using DecorateDocument or test to see if a form is XFA before you try to populate it with data using FillForm since AcroForms and XFA require different inputs.
To learn more about the DocumentProperties service, check out the documentation for the Datalogics WebAPI.