Actions114
- AI Actions
- AI Advanced OCR
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Enitity Detection
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate Javascript Code
- Generate Python Code
- Language Detection
- Mood Detection
- PDF OCR
- Picture Object Recognition
- Picture Text Recognition
- Redact Sensitive Information From PDF
- Too Long To Read
- Transcribe
- Translation
- 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
PDF → Draw
AI-generatedOverview
This node operation allows users to draw on PDF documents by adding either text or images. It supports specifying the PDF source via URL or buffer, selecting pages to manipulate, positioning elements with anchor and alignment options, and customizing text properties such as font, size, and color. This is useful for annotating PDFs, adding watermarks, or embedding images dynamically within PDF files.
Use Case Examples
- Adding a text annotation to specific pages of a PDF document.
- Embedding an image onto a PDF page at a specified position and size.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Variables defined in the code editor for the selected function, used to dynamically set values during execution. |
| Draw Pdf | Select whether to draw text or an image on the PDF. |
| URL | Public URL of the PDF file to be manipulated. |
| Buffer | Base64-encoded buffer of the PDF file to be manipulated. |
| Get File as URL | Whether to return the resulting PDF as a URL. |
| Filename | Filename of the PDF file. |
| Rotation of the Image/Text | Counter-clockwise rotation angle in degrees for the image or text to be drawn. |
| Anchor of the Image | Positioning anchor of the image relative to the page. |
| Align of the Image | Part of the image that should align with the specified position. |
| X-Offset | X-axis offset in points relative to the anchor position. |
| Y-Offset | Y-axis offset in points relative to the anchor position. |
| Pages | Pages of the PDF to manipulate, specified as ranges or individual pages. |
| Text | Text content to draw on the PDF (when drawing text). |
| Color | Font color for the text as a six-digit hex code. |
| Size | Font size of the text in points. |
| Font | Font type to use for the text. |
| URL of the Image | Public URL of the image to draw on the PDF (when drawing image). |
| Imagebuffer of the Image | Base64-encoded buffer of the image to draw on the PDF (when drawing image). |
| Width of Image | Width of the image to be added. |
| Height of Image | Height of the image to be added. |
Output
JSON
result- The resulting PDF after drawing operations, either as a buffer or URL depending on settings.
Dependencies
- An API key credential for the CodeKit API
Troubleshooting
- Ensure the PDF source (URL or buffer) is valid and accessible to avoid errors loading the file.
- When drawing images, verify the image URL or buffer is correctly provided and accessible.
- If the output is expected as a URL, ensure the 'Get File as URL' option is set to true and the environment supports URL generation.
- Common errors may include invalid page ranges or unsupported font names; verify input parameters carefully.