0CodeKit icon

0CodeKit

A toolbox of no-code utilities

Actions114

PDF → PDF to Base64

AI-generated

Overview

This node operation converts a PDF file, provided either as a public URL or a buffer string, into a Base64 encoded string. It is useful in scenarios where you need to embed or transmit PDF content in a text-based format, such as embedding in JSON, sending over APIs, or storing in databases that require Base64 encoding.

Use Case Examples

  1. Converting a PDF from a URL to Base64 for embedding in an email body.
  2. Encoding a PDF buffer to Base64 to store in a database or send via a webhook.

Properties

Name Meaning
Pdf The PDF input which can be a public URL or a buffer string representing the PDF content.
Filename The filename of the PDF, used for identification or output naming purposes.
Code Variables Optional code variables that can be defined and used within the node's code editor for advanced customization or scripting.

Output

JSON

  • base64 - The Base64 encoded string representation of the input PDF.

Dependencies

  • Requires an API key credential for the CodeKit API to perform the PDF to Base64 conversion.

Troubleshooting

  • Ensure the PDF input is a valid URL or a correctly formatted buffer string; invalid inputs will cause errors.
  • Check that the API key credential is correctly configured and has the necessary permissions.
  • If the node throws errors related to network or API access, verify connectivity and API endpoint availability.

Discussion