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 → Count PDF Pages
AI-generatedOverview
The node provides utilities for working with PDF files, specifically including an operation to count the number of pages in a PDF document. This is useful when you need to quickly determine the length of a PDF without downloading or manually inspecting it. Common scenarios include validating document size before processing, generating reports about document contents, or automating workflows that depend on page counts.
For example, you might use this node to:
- Automatically check if a PDF invoice has more than a certain number of pages before sending it for approval.
- Count pages in a batch of PDFs to generate metadata for a document management system.
- Validate uploaded PDFs in a form submission process by checking their page count.
Properties
| Name | Meaning |
|---|---|
| PDF URL | Public URL of the PDF file to analyze. |
| PDF Buffer | Binary buffer data of the PDF file (alternative to providing a URL). |
The user must provide either a publicly accessible URL pointing to the PDF or the binary content of the PDF as a buffer string.
Output
The node outputs JSON data containing the count of pages in the provided PDF document. The exact structure is not shown in the source, but typically it would be something like:
{
"pageCount": 10
}
This output allows downstream nodes to access the number of pages and make decisions or further processing based on that value.
No binary data output is indicated for this operation.
Dependencies
- Requires an API key credential for authentication to the external service at
https://prod.0codekit.com. - The node sends a POST request to the
/pdf/countendpoint with either the PDF URL or buffer in the request body. - No other external dependencies are indicated.
Troubleshooting
Common issues:
- Providing an invalid or inaccessible PDF URL will likely cause errors or zero page count results.
- Supplying malformed or incorrect binary buffer data may result in failure to parse the PDF.
- Missing or invalid API credentials will prevent the node from authenticating with the external service.
Error messages:
- Authentication errors indicate problems with the API key; ensure the correct credential is configured.
- Network or timeout errors suggest connectivity issues to the external API endpoint.
- Parsing errors imply the PDF data is corrupted or unsupported.
To resolve these, verify the input PDF source, confirm API credentials, and ensure network connectivity.
Links and References
- PDF specification overview — For understanding PDF structure.
- 0CodeKit API documentation (if publicly available) — For detailed API usage and supported operations.