Actions108
- AI Actions
- Transcribe
- Detect Brand
- Extract Contact Information
- Mood Detection
- Detect Adult Content
- Enitity Detection
- Language Detection
- Too Long To Read
- Check Content Policy
- Detect Faces
- Generate Python Code
- Picture Text Recognition
- Detect Color
- Generate Image
- PDF OCR
- Translation
- Detect Email Type
- Generate Javascript Code
- Picture Object Recognition
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
Overview
This node provides utilities to manipulate PDF files, specifically focusing on retrieving and editing PDF metadata when using the "PDF" resource with the "Metadata" operation. It allows users to either get existing metadata from a PDF or edit metadata fields such as title, author, subject, and keywords.
Common scenarios include:
- Extracting metadata information from PDFs for cataloging or indexing.
- Updating metadata of PDFs to reflect new authorship, titles, or keywords before distribution.
- Automating PDF metadata management in document workflows.
For example, you can input a PDF file (via URL or buffer) and retrieve its metadata, or update the metadata fields and output the modified PDF.
Properties
| Name | Meaning |
|---|---|
| Metadata | Choose between "Edit Metadata" (to modify metadata fields) or "Get Pdf Metadata" (to retrieve info) |
| URL | Public URL of the PDF file to process |
| Buffer | PDF content as a string buffer |
| Get File as URL | Boolean indicating if the resulting PDF should be returned as a URL (only for editing metadata) |
| Filename | Filename of the PDF (used when editing metadata) |
| Title | New Title to set in the PDF metadata (when editing) |
| Author | New Author to set in the PDF metadata (when editing) |
| Subject | New Subject to set in the PDF metadata (when editing) |
| Keywords | New keywords to set in the PDF metadata; multiple values allowed (when editing) |
| Code Variables | Collection of code variables (name-value pairs) used internally for some operations (not typical for metadata operation) |
Output
The node outputs JSON data representing the result of the metadata operation:
- For Get Pdf Metadata: The output JSON contains the extracted metadata fields from the PDF, such as title, author, subject, keywords, and possibly other standard PDF metadata properties.
- For Edit Metadata: The output JSON includes the updated PDF file, which can be returned either as a binary buffer or as a public URL depending on the "Get File as URL" property.
If the node is configured to return the PDF as a URL, the output will contain a link to the modified PDF file. Otherwise, it will provide the PDF content in binary form.
Dependencies
- Requires an API key credential for authentication with the external service that performs PDF processing.
- The node depends on an external API endpoint under the "pdf/metadata/edit" or "pdf/metadata/info" paths to perform metadata editing or retrieval.
- No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
Common issues:
- Providing an invalid or inaccessible PDF URL may cause errors fetching or processing the file.
- Supplying an empty or malformed PDF buffer will lead to failures.
- Attempting to edit metadata without specifying required fields like filename or missing the PDF content will cause errors.
- If "Get File as URL" is enabled but the system cannot generate a public URL, the output may fail or be empty.
Error messages:
- Errors related to network connectivity or authorization usually indicate problems with the API key credential or internet access.
- Parsing errors suggest the input PDF is corrupted or not properly formatted.
- Validation errors occur if mandatory parameters are missing or invalid.
To resolve these issues:
- Verify the PDF source (URL or buffer) is correct and accessible.
- Ensure all required fields for editing metadata are provided.
- Confirm the API key credential is valid and has necessary permissions.
- Check network connectivity and firewall settings.
Links and References
- n8n Expressions Documentation — for using expressions in variable fields.
- General PDF metadata standards (e.g., Adobe PDF Reference) for understanding metadata fields.
- External API documentation (if available) for the PDF processing service used by this node (not included in the source).