Actions132
- AI Actions
- Extract Text From Document
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Extract Entities
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate JavaScript Code
- Generate Python Code
- Detect Language
- Detect Mood
- Extract Text From PDF
- Recognize Objects in Image
- Extract Text From Image
- Redact Sensitive Information From PDF
- Remove Background Image
- Summarize Text
- Transcribe
- Translate Text
- Image Actions
- Business Actions
- Convert Actions
- Generate Actions
- Crypto Actions
- Operator Actions
- Storage Actions
- Scheduler Actions
- Text Actions
- Chart Actions
- Code Actions
- Calculate Actions
- Date and Time Actions
- PDF Actions
- Compress PDF File
- Count PDF Pages
- Create Empty PDF
- Decrypt PDF
- Convert DOCX to PDF
- Draw Image on PDF
- Draw Text on PDF
- Encrypt PDF
- Convert HTML to PDF
- Convert Markdown to PDF
- Manage PDF Metadata
- Merge PDF Files
- Add PDF Pages
- Remove PDF Pages
- Resize PDF Pages
- Rotate PDF Pages
- Convert PDF to Base64
- Convert PDF to Image
- Split PDF File
- Add Image Watermark to PDF
- Add Text Watermark to PDF
- Shortened URL Actions
PDF → Convert PDF to Base64
AI-generatedOverview
This node provides a utility to convert PDF files into Base64-encoded strings. It accepts a PDF file either as a URL or as binary buffer data and outputs the Base64 representation of that PDF. This is useful in scenarios where you need to embed PDF content directly into JSON payloads, transmit PDFs over text-based protocols, or store PDFs in systems that require Base64 encoding.
Practical examples include:
- Embedding a PDF document within an email body or API request.
- Storing PDF content in databases or cloud storage services that accept Base64 strings.
- Passing PDF data between different systems without dealing with file handling.
Properties
| Name | Meaning |
|---|---|
| PDF Source | The source of the PDF file. Can be a URL pointing to the PDF or binary buffer data. |
| File Name | Optional name for the output file. Useful for identification or downstream processing. |
Output
The node outputs a JSON object containing the Base64-encoded string of the provided PDF file. The exact structure is not fully detailed in the source, but typically it will have a field holding the Base64 string representing the entire PDF content.
If the input was binary data, the output Base64 string corresponds to that binary content encoded in Base64.
No binary output is indicated; the output is purely JSON with Base64 data.
Dependencies
- Requires an API key credential for authentication to the external service at
https://prod.0codekit.com. - The node sends a POST request to the endpoint
/pdf/base64with the PDF data and optional filename. - No other external dependencies are indicated.
Troubleshooting
Common issues:
- Providing an invalid or inaccessible PDF URL may cause the conversion to fail.
- Supplying malformed binary data instead of a valid PDF can result in errors or invalid Base64 output.
- Missing or incorrect API credentials will prevent successful requests.
Error messages:
- Authentication errors due to missing or invalid API keys.
- HTTP errors if the PDF URL is unreachable or the server returns an error.
- Validation errors if required parameters like the PDF source are empty.
To resolve these:
- Ensure the PDF URL is accessible and points to a valid PDF file.
- Verify the binary data input is correctly formatted.
- Confirm the API key credential is properly configured in n8n.
Links and References
- Base64 Encoding Wikipedia
- PDF File Format (official specification)
- Documentation for the external API service (not publicly linked in source)