Skip to main content
PDF Blocks logo
  • Category: documents
  • Auth: API_KEY
  • Composio-managed OAuth available? N/A
  • Tools: 17
  • Triggers: 0
  • Slug: PDF_BLOCKS
  • Version: 00000000_00

Tools

Slug: PDF_BLOCKS_ADD_IMAGE_WATERMARKAdd a PNG or JPEG image as a watermark on all or selected PDF pages.

Input Parameters

object
required
PDF file to watermark.
object
required
PNG or JPEG image to use as the watermark.
string
One-based pages and ranges to watermark, such as ‘1,3..5’; omit to watermark every page.
number
Margin from the page border in inches.
integer
Watermark transparency percentage, where 0 is opaque and 100 is fully transparent.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_ADD_PASSWORDCreate an encrypted copy of a PDF that requires a password to open.

Input Parameters

object
required
PDF file to encrypt.
string
required
Printable ASCII password required to open the output PDF. This secret is sent only to PDF Blocks and is never returned.
string ("AES-128" | "AES-256")
Encryption algorithm for the output PDF.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_ADD_RESTRICTIONSCreate an encrypted PDF copy with explicit permissions for copying, editing, printing, forms, assembly, and accessibility. Permissions are allowed by default; set an allow_* parameter to false to restrict that capability.

Input Parameters

object
required
PDF file to protect with permission restrictions.
boolean
Allow printing the PDF.
string
Optional printable ASCII password required to open the PDF. Omit it to allow opening without a password. This secret is never returned.
string
required
Printable ASCII owner password that controls future permission changes. This secret is never returned.
boolean
Allow filling interactive form fields.
boolean
Allow copying content from the PDF.
boolean
Allow accessibility tools to extract content.
boolean
Allow changing PDF content.
string ("AES-128" | "AES-256")
Encryption algorithm for the restricted PDF.
boolean
Allow document assembly operations such as inserting or rotating pages.
boolean
Allow comments and interactive form filling.
boolean
Allow high-resolution printing when printing is allowed.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_ADD_TEXT_WATERMARKAdd up to three styled text lines as a watermark on all or selected PDF pages.

Input Parameters

object
required
PDF file to watermark.
string ("Red" | "Blue" | "Gray" | "Black")
Watermark text color.
string
One-based pages and ranges to watermark, such as ‘1,3..5’; omit to watermark every page.
string
required
First watermark line using standard Latin characters.
string
Optional second watermark line.
string
Optional third watermark line.
number
Margin from the page border in inches.
integer ("1001" | "1002" | "1003" | "1004" | "1005" | "1017" | "1018" | "1019" | "1020" | "1021")
Watermark layout template. IDs 1001-1005 are filled and 1017-1021 are outline; within each set, the layouts are diagonal bottom-left to top-right, diagonal top-left to bottom-right, horizontal, vertical reading upward, and vertical reading downward, respectively.
integer
Watermark transparency percentage, where 0 is opaque and 100 is fully transparent.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_EXTRACT_PAGESCreate a PDF containing selected source pages in their original order.

Input Parameters

object
required
PDF file from which to extract pages.
string
Set of one-based pages and inclusive ’..’ ranges, such as ‘1,3..5’; order and duplicates are ignored. Omit to include all pages.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_MERGE_PDFSMerge PDF files into one PDF in the exact order provided.

Input Parameters

array
required
PDF files to merge, in output order; repeated files are allowed.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_REMOVE_PAGESCreate a PDF with selected pages removed while preserving the remaining page order.

Input Parameters

object
required
PDF file from which to remove pages.
string
required
Set of one-based pages and inclusive ’..’ ranges to remove, such as ‘2,4..6’; at least one page must remain.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_REMOVE_PASSWORDCreate an unencrypted copy of a password-protected PDF using its current password.

Input Parameters

object
required
Encrypted PDF file to decrypt.
string
required
Current PDF password. This secret is sent only to PDF Blocks and is never returned.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_REMOVE_RESTRICTIONSCreate a PDF copy with permission restrictions cleared.

Input Parameters

object
required
PDF file whose permission restrictions should be cleared.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_REMOVE_SIGNATURESCreate a PDF copy with all digital signatures and timestamps removed.

Input Parameters

object
required
Signed PDF file from which to remove digital signatures and timestamps.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_REORDER_PAGESCreate a PDF in an exact page order, optionally dropping or repeating source pages.

Input Parameters

object
required
PDF file whose pages should be reordered.
string
required
Exact output order using comma-separated one-based pages and inclusive ’..’ ranges. Omitted pages are dropped, duplicates repeat pages, negative indexes count from the end, and ranges may run backward; for example ‘3,1..2,-1’.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_REVERSE_PAGESCreate a PDF with the complete page order reversed.

Input Parameters

object
required
PDF file whose page order should be reversed.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_ROTATE_PAGESRotate all or selected PDF pages by a supported multiple of 90 degrees.

Input Parameters

object
required
PDF file whose pages should be rotated.
integer ("0" | "90" | "180" | "270" | "-90" | "-180" | "-270")
required
Rotation angle in degrees; positive values rotate clockwise and negative values rotate counter-clockwise.
string
One-based pages and ranges to rotate, such as ‘1,3..5’; omit to rotate every page.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_SPLIT_PDF_AT_PAGESplit a PDF into exactly two downloadable PDFs at a page boundary; the selected page starts the second PDF.

Input Parameters

object
required
PDF file to split.
integer
required
One-based page number that begins the second output PDF; it cannot exceed the input page count.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_SPLIT_PDF_BY_PAGE_COUNTSplit a PDF into consecutive downloadable PDFs containing up to a fixed number of pages each.

Input Parameters

object
required
PDF file to split.
integer
required
Maximum number of consecutive pages in each output PDF.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_SPLIT_PDF_BY_PAGE_GROUPSCreate one downloadable PDF for each caller-defined ordered group of source pages.

Input Parameters

object
required
PDF file to split.
string
required
Semicolon-separated output groups, with comma-separated one-based pages or inclusive ’..’ ranges inside each group. Order, duplicates, and backward ranges are preserved; for example ‘2..8,29;1’.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: PDF_BLOCKS_SPLIT_PDF_BY_SIZESplit a PDF into downloadable PDFs no larger than a requested byte limit.

Input Parameters

object
required
PDF file to split.
integer
required
Maximum byte size allowed for each output PDF.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not