Actions114
- AI Actions
- AI Advanced OCR
- Check Content Policy
- Detect Adult Content
- Detect Brand
- Detect Color
- Detect Email Type
- Detect Faces
- Enitity Detection
- Extract Contact Information
- Extract Customizable Information From Text
- Fuzzy Text Matcher
- Generate Image
- Generate Javascript Code
- Generate Python Code
- Language Detection
- Mood Detection
- PDF OCR
- Picture Object Recognition
- Picture Text Recognition
- Redact Sensitive Information From PDF
- Too Long To Read
- Transcribe
- Translation
- Business Actions
- Calculate Actions
- Code Actions
- Convert Actions
- Crypto Actions
- Date & Time Actions
- Generate Actions
- Image Actions
- Operator Actions
- PDF Actions
- Storage Actions
- Text Actions
- User Actions
PDF → Count PDF Pages
AI-generatedOverview
This node operation counts the number of pages in a PDF file. It supports inputting the PDF either via a public URL or as binary data (buffer). This is useful in scenarios where you need to quickly determine the length of a PDF document, such as for document management, processing workflows, or validation before further PDF manipulations.
Use Case Examples
- Counting pages of a PDF file available online by providing its URL.
- Counting pages of a PDF file uploaded as binary data within a workflow.
Properties
| Name | Meaning |
|---|---|
| Code Variables | Allows setting code variables defined in the code editor for the selected function, useful for dynamic input or scripting within the node. |
| URL or Binary Data | Selects whether the PDF input is provided as a URL or as binary data buffer. |
| URL | Public URL of the PDF file to count pages from. Required if 'URL' is selected as input type. |
| Binary Data | Binary buffer of the PDF file to count pages from. Required if 'Binary Data' is selected as input type. |
| Pages | Pages inside the PDF file, applicable when input is binary data buffer. |
Output
JSON
pageCount- The total number of pages in the PDF file.
Dependencies
- Requires an API key credential for the CodeKit API to perform PDF page counting.
Troubleshooting
- Ensure the PDF URL is publicly accessible if using URL input; otherwise, the node may fail to fetch the PDF.
- If using binary data input, verify the buffer is correctly passed and represents a valid PDF file.
- Common errors may include invalid PDF format or inaccessible URL, which can be resolved by checking the input source and format.