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 → Remove PDF Pages
AI-generatedOverview
The node provides a utility to remove specified pages from a PDF document. It supports inputting the PDF either via a public URL or as binary buffer data. Users specify which pages to remove using a flexible page range syntax, including support for ranges and negative indexing (e.g., ^1 for the last page). The output can be returned either as a downloadable URL or as raw binary data.
This node is beneficial in scenarios where you need to programmatically edit PDFs by removing unwanted pages without manual intervention. For example:
- Removing cover pages or appendices from reports before sharing.
- Excluding confidential pages from documents before distribution.
- Automating cleanup of large PDF files by removing irrelevant sections.
Properties
| Name | Meaning |
|---|---|
| PDF URL | Public URL of the PDF file to process. |
| PDF Buffer | Binary buffer data of the PDF file to process. |
| Pages to Remove | Specifies pages to remove from the PDF. Supports single pages, ranges (e.g., 3-5), and negative indexes (e.g., ^1 for last page). Example: 1,3-5,^3-^1. |
| File Name | Desired name for the output PDF file after pages are removed. |
| Return as URL | Boolean flag indicating whether the output PDF should be returned as a downloadable URL (true) or as raw binary data (false). |
Output
The node outputs the modified PDF with the specified pages removed. Depending on the "Return as URL" property:
- If
true, the output contains a URL pointing to the downloadable PDF file. - If
false, the output contains the binary data of the resulting PDF file.
The exact JSON structure of the output includes at least one field holding either the URL string or the binary buffer representing the edited PDF.
Dependencies
- Requires an API key credential for authentication with the external service at
https://prod.0codekit.com. - The node sends a POST request to the endpoint
/pdf/pages/removewith the provided parameters. - No additional environment variables are explicitly required beyond the API key credential.
Troubleshooting
- Common issues:
- Invalid page range syntax may cause errors or unexpected results. Ensure page ranges are correctly formatted.
- Providing both URL and buffer empty or invalid will result in failure to load the PDF.
- Network or authentication errors if the API key is missing or invalid.
- Error messages:
- Errors related to page specification usually indicate malformed input; verify the "Pages to Remove" format.
- Authentication errors suggest checking the API key credential configuration.
- File not found or inaccessible URL errors occur if the provided PDF URL is not publicly reachable.
Links and References
- No direct links available from the source code.
- For more information, consult the documentation of the external PDF processing service used by this node (likely accessible via the service base URL).