- Category: documents
- Auth: API_KEY
- Composio-managed OAuth available? N/A
- Tools: 12
- Triggers: 0
- Slug:
CRAFTMYPDF - Version: 20261101_00
Tools
Add Text to PDF
Add Text to PDF
Slug:
CRAFTMYPDF_ADD_TEXT_TO_PDFTool to add text annotations to a PDF including page numbers, watermarks, and custom text at specified positions. Supports dynamic variables like {{pageNumber}} and {{totalPages}} for automatic page numbering. Use when you need to add watermarks, headers, footers, or any text overlay to existing PDF documents.Input Parameters
Expiration time in minutes for the generated PDF link. Range: 1-10080 minutes (7 days). Defaults to 5 minutes if not specified.
Array of text annotation settings. Each item defines text to add with its position, styling, and target pages. Multiple settings can be applied to add different text elements to various pages.
Whether to upload the generated PDF to CraftMyPDF’s CDN. Set to 1 (upload to CDN) or 0 (skip upload). If you have configured Post Actions to upload to your own S3, set to 0. Defaults to 1.
Output
Add Watermark to PDF
Add Watermark to PDF
Slug:
CRAFTMYPDF_ADD_WATERMARKTool to add a text watermark to a PDF with customizable font, size, color, opacity, and rotation. Use when you need to overlay watermark text (e.g., CONFIDENTIAL, DRAFT) on PDF documents. For more advanced text placement and formatting options, consider using the add-text-to-pdf endpoint instead.Input Parameters
URL of the source PDF document to add watermark to. Must be a publicly accessible URL.
Opacity/transparency of the watermark, ranging from 0 (fully transparent) to 1 (fully opaque). Default is 0.5.
Rotation angle of the watermark text in degrees. Positive values rotate clockwise. Default is 45 degrees.
Hex color code for the watermark text (must start with # followed by 6 hex digits). Default is ‘#c7c7c7’ (light gray).
Expiration time in minutes for the generated PDF link. Must be between 1 minute and 10080 minutes (7 days). Default is 5 minutes.
string ("Courier" | "Courier-Bold" | "Courier-Oblique" | "Courier-BoldOblique" | "Helvetica" | "Helvetica-Bold" | "Helvetica-Oblique" | "Helvetica-BoldOblique" | "Times-Roman" | "Times-Bold" | "Times-Italic" | "Times-BoldItalic" | "Symbol" | "ZapfDingbats")
Available font families for watermark text.
Whether to upload the generated PDF to CDN storage. Set to 1 (default) to upload to CDN, or 0 if you have configured Post Actions to upload to your own S3 bucket.
AWS S3 bucket name to override for Post Action (S3 Storage). Only used if you have Post Actions configured.
File name/key for Post Action (S3 Storage). Do not include file extension. Use slash (/) as folder delimiter. Must be unique.
Output
Create Editor Session
Create Editor Session
Create PDF Asynchronously (Extended)
Create PDF Asynchronously (Extended)
Slug:
CRAFTMYPDF_CREATE_PDF_ASYNC2Create a PDF asynchronously from a template and JSON data, returning a transaction reference and optionally sending a GET callback to a supplied webhook URL when the PDF is generated. Supports image optimization, resizing, and custom storage options.Input Parameters
JSON data to populate template fields. Accepts either a JSON object or a stringified JSON string. Keys should match the template’s data bindings.
Expiration time of the generated PDF in minutes. Default is 5 minutes, range is between 1 minute and 10080 minutes (7 days).
Template ID to use for PDF generation. Obtain valid template IDs from the list-templates endpoint.
Callback URL to your server for receiving the PDF result. Must start with http:// or https:// and should be URL-encoded. When PDF is generated, a GET request is made to: webhook_url?file=[file_url]&transaction_ref=[transaction_ref]&status=[status]&message=[message]&details=[details]
Upload the generated PDFs/images to storage CDN. Default is 1. Set to 0 if you have configured Post Actions to upload to your own S3.
Resize all images in the PDF to help reduce file size, especially if the template contains multiple or large images. Set to true to enable. Only works with JPEG/JPG/PNG images.
If resize_images is enabled, specify the maximum width in pixels for images. Default is 1000.
If resize_images is enabled, specify the maximum height in pixels for images. Default is 1000.
Optimize/downsample images in the PDF to a specified resolution in DPI. Helps reduce PDF file size. Suggested values are 1200, 600, 300, 150, or 72.
Specify the file name for Post Action (S3 Storage). Do not include file extension. Ensure the file name is unique. You can use slash (/) as folder delimiter.
Output
Create PDFs in Parallel
Create PDFs in Parallel
Slug:
CRAFTMYPDF_CREATE_PDF_PARALLELTool to create multiple PDF files in parallel from templates with JSON data. Processes multiple PDF generation requests concurrently for improved performance. Optionally merges all generated PDFs into a single file when merge parameter is enabled. Use when you need to generate multiple PDFs at once from different templates or data.Input Parameters
Whether to merge all generated PDFs into a single PDF file. Defaults to false if not specified.
Array of PDF generation requests to process in parallel. Each request contains template_id, data, and optional meta field.
Expiration time in minutes for the merged PDF file. Only applicable when merge is true. Valid range: 1-10080 minutes (7 days). Defaults to 5 minutes.
Output
Get Account Information
Get Account Information
Get PDF Information
Get PDF Information
List PDF Templates
List PDF Templates
List API Transactions
List API Transactions
Merge PDF Files
Merge PDF Files
Slug:
CRAFTMYPDF_MERGE_PDFSTool to merge multiple PDF files from URLs into a single PDF document. Use when you need to combine multiple PDF files into one consolidated document. The API fetches PDFs from the provided URLs and merges them in the order specified.Input Parameters
Array of PDF URLs to merge. Each URL should be publicly accessible and point to a valid PDF file.
Expiration time in minutes for the generated PDF link. Default is 5 minutes, range between 1 minute and 10080 minutes (7 days).
Upload the generated PDF to storage CDN. Default is 1 (enabled). Set to 0 if you have configured Post Actions to upload to your own S3.
File name for Post Action S3 Storage. Do not specify the file extension. Make sure the file name is unique. You can use slash (/) as folder delimiter.
Output
Query Template Usage Statistics
Query Template Usage Statistics
Slug:
CRAFTMYPDF_QUERY_TEMPLATE_USAGETool to retrieve usage statistics for specified templates within a date range. Use when you need to track PDF generation counts and credit consumption for specific templates.Input Parameters
End date for the usage query in ISO 8601 format (UTC time). Example: ‘2025-01-30T23:59:59Z’. If not provided, uses default date range.
Start date for the usage query in ISO 8601 format (UTC time). Example: ‘2025-01-30T00:00:00Z’. If not provided, uses default date range.
Comma-separated list of template IDs to query usage statistics for. Example: ‘bba77b234e84443e,02077b2b1aa8b938’
Output
Update PDF Fields
Update PDF Fields
Slug:
CRAFTMYPDF_UPDATE_PDF_FIELDSTool to update fillable fields in a PDF document such as text fields, checkboxes, and dropdowns. Use when you need to programmatically fill out PDF forms by updating field values. The PDF must contain fillable form fields with identifiable names that match the field IDs you provide.Input Parameters
The publicly accessible URL of the PDF file to update. The PDF must contain fillable form fields with identifiable names.
Array of field updates to apply to the PDF. Each field object specifies which field to update and its new value. The field IDs must match existing field names in the PDF.
Expiration time in minutes for the generated PDF URL. Valid range: 1 to 10080 minutes (7 days). Defaults to 5 minutes if not specified.
Whether to upload the generated PDF to the CraftMyPDF CDN. Set to 1 (default) to upload to CDN, or 0 if you have configured Post Actions to upload to your own S3 storage.