This article describes how to view metadata of PDF with Node.js REST API. You will learn to automatically print the PDF document metadata with Node.js REST Interface using the Node.js-based Cloud SDK. You may select a particular property using the Find method by providing the desired property name.
Prerequisite
- Create an account API credentials
- Download Aspose.PDF Cloud SDK for Node.js to view metadata
- Setup Node.js project with the above SDK for reading the file properties
Steps to Access PDF Metadata with Node.js Low Code API
- Configure the PdfApi class object using the Client ID and secret to check metadata
- Upload the source PDF file for viewing the metadata
- Call the GetDocumentProperties() method to fetch the file properties
- Parse through the document properties in the API response object
- Display all or selected properties on the console
The above steps describe how to check metadata PDF with Node.js Low Code API. Configure the PdfApi object, upload the source PDF file, call the GetDocumentProperties() method, and parse the API response. Based on your requirements, you can display all or selected properties.
Code to Read Metadata from PDF with Node.js-based API
This code has enabled us to see PDF metadata with Node.js-based API. You can find a property by providing the name as demonstrated by finding the property “Producer” in the above code. You can also use other variants of this method to fetch the selected property instead of all the properties in the uploaded PDF file.
This article has taught us to view the PDF meta information with Node.js RESTful Service. If you want to update the PDF metadata, refer to the article on Update PDF metadata with Node.js REST API.