Actions28
- Conversion Actions
- Document Actions
- PDF Service Actions
- Template Actions
- Workspace Actions
Overview
The "Extract Form Fields" operation of the PDF Service resource allows users to extract form fields and their metadata from an existing PDF document. This is useful when you need to analyze or manipulate interactive PDF forms by retrieving details such as field names, types, and other properties embedded in the PDF.
Common scenarios include:
- Automatically reading form fields from a PDF template to prepare for data filling.
- Extracting form structure for validation or integration with other systems.
- Auditing or documenting the form fields present in a PDF.
For example, if you have a PDF form that collects user information, this operation can extract all the input fields (like name, email, date) so you can programmatically understand what data is required or available.
Properties
| Name | Meaning |
|---|---|
| PDF Source | Source of the PDF document to process. Options: - From URL: Use a PDF from a public URL. - From Base64: Use a PDF from base64 encoded content. |
| PDF URL | Public URL to the PDF document. Required if PDF Source is "From URL". |
| PDF Base64 | Base64 encoded PDF content. Required if PDF Source is "From Base64". |
| Output Format | Choose output format: - Base64 (JSON): Returns JSON response with base64 string. - File (Binary): Returns binary file data for download/attachment. - URL (JSON): Returns JSON response with download URL. |
Output
The output JSON contains the extracted form fields and their metadata from the provided PDF document. The exact structure depends on the API response but typically includes:
success: Boolean indicating if extraction was successful.operation: The operation performed ("extractFormFields").- A list or object describing each form field, including attributes like field name, type, value, and possibly additional metadata.
If the output format is set to "File (Binary)", the node returns the processed PDF as binary data suitable for download or further processing.
If the output format is "Base64 (JSON)" or "URL (JSON)", the response includes either a base64-encoded string of the result or a URL where the extracted data can be accessed.
Dependencies
- Requires an API key credential for authentication with the external PDF Generator API service.
- The node makes HTTP POST requests to the
/pdfservices/form/fieldsendpoint of the API. - The PDF document must be accessible either via a public URL or provided as base64 content.
Troubleshooting
- Invalid PDF Source: Ensure that the PDF source matches the selected option. If "From URL" is chosen, provide a valid public URL; if "From Base64", ensure the base64 string is correctly formatted.
- Malformed JSON Errors: Input parameters that expect JSON (not applicable directly here but relevant for other operations) must be valid JSON strings.
- Authentication Errors: Verify that the API key credential is correctly configured and has necessary permissions.
- Unsupported Operation Error: If the operation is not recognized, confirm that "Extract Form Fields" is selected under the PDF Service resource.
- Empty or Missing Fields: If no form fields are extracted, verify that the PDF actually contains interactive form fields.
Links and References
- PDF Generator API Documentation (general reference for API endpoints)
- n8n Documentation on Custom Nodes (for understanding node development and usage)
This summary is based solely on static analysis of the provided source code and property definitions.