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 → Resize PDF Pages
AI-generatedOverview
The "Resize PDF Pages" operation in the PDF resource allows users to resize pages of a PDF document to a specified target size. This node is useful when you need to standardize or adjust the page dimensions of PDFs for printing, presentation, or compliance with specific format requirements.
Typical use cases include:
- Resizing scanned documents to common paper sizes like A4 or Letter.
- Preparing PDFs for different print formats by resizing pages accordingly.
- Adjusting only selected pages within a PDF rather than the entire document.
For example, you might input a PDF from a URL or binary buffer, specify that only pages 1 and 3 to 5 should be resized to A4 size, and choose how the content fits on the new page (fit inside, fill, or stretch). The output can be returned as a downloadable URL or as binary data.
Properties
| Name | Meaning |
|---|---|
| PDF URL | Public URL of the PDF file to be resized. |
| PDF Buffer | Binary buffer data of the PDF file to be resized. |
| Target Size | The desired page size to resize to. Options: A3, A4, A5, Legal, Letter, Tabloid. |
| Pages to Resize | Specifies which pages to resize. Supports ranges (e.g., "1,3-5,^3-^1"), where 1 is first page and ^1 last page. Leave empty to resize all pages. |
| Fit Mode | How to fit the existing content into the new page size. Options: Fit Inside (content fits within page), Fill (content fills page, possibly cropping), Stretch (content stretched to fill page). |
| File Name | Desired name for the output PDF file. |
| Return as URL | Boolean flag indicating whether to return the resized PDF as a downloadable URL (true) or as binary data (false). |
Output
The node outputs the resized PDF either as:
- A downloadable URL if "Return as URL" is set to true. This URL points to the processed PDF file.
- Binary data representing the resized PDF file if "Return as URL" is false.
The output JSON will contain the relevant link or binary data depending on the chosen option.
Dependencies
- Requires an API key credential for authentication with the external 0CodeKit service.
- The node sends a POST request to the endpoint
/pdf/pages/resizeon the 0CodeKit API. - The user must provide either a public URL or binary buffer of the PDF to process.
- Network access to the 0CodeKit API endpoint is required.
Troubleshooting
- Invalid PDF input: If neither a valid URL nor a binary buffer is provided, the operation will fail. Ensure one of these inputs is correctly set.
- Page range errors: Incorrectly formatted page ranges (e.g., invalid syntax) may cause errors or unexpected behavior. Use correct syntax like "1,3-5,^1".
- API authentication errors: Missing or invalid API credentials will prevent the node from working. Verify the API key configuration.
- Network issues: Connectivity problems to the external API will cause failures. Check network and firewall settings.
- File naming: If the output filename is not set, the system may assign a default name; ensure the filename is valid and includes
.pdfextension if needed.
Links and References
- PDF Page Sizes Reference
- 0CodeKit API Documentation (general reference, actual docs may require login)
- Common PDF manipulation tools and libraries for comparison: PDFLib, PDF.js