PDF Splitter
JSON →Provides random access to PDF contents, allowing selective extraction of pages and content to reduce reading costs.
Tools · 12
- load_pdf Load a PDF file into memory (supports URLs). Parameters: path (string - local path or URL). Returns: PDF ID and page count.
- extract_page Extract content from a specific page. Parameters: pdfId (string), pageNumber (number, 1-indexed). Returns: Page content as text.
- extract_range Extract content from a range of pages. Parameters: pdfId (string), startPage (number), endPage (number). Returns: Combined content from the page range.
- search_pdf Search for text within the PDF. Parameters: pdfId (string), query (string), caseSensitive (boolean, optional). Returns: Search results with page numbers and context.
- get_pdf_info Get metadata about a loaded PDF. Parameters: pdfId (string). Returns: PDF information including metadata.
- list_loaded_pdfs List all currently loaded PDFs. Returns: Array of loaded PDFs with their IDs and page counts.
- extract_outline Extract document outline/TOC with page numbers. Parameters: pdfId (string). Returns: Formatted outline with page references.
- list_images List all images in the PDF with metadata. Parameters: pdfId (string). Returns: Array of image information (page, index, dimensions, format).
- extract_images Extract images from the PDF as base64-encoded data. Parameters: pdfId (string), pageNumbers (array of numbers, optional), dpi (number, optional, default: 96), outputPath (string, optional - save images to files instead of returning base64). Returns: Array of images with base64 data (or saves to files if outputPath provided).
- extract_image Extract a specific image from the PDF. Parameters: pdfId (string), pageNumber (number), imageIndex (number), dpi (number, optional, default: 96), outputPath (string, optional - save image to file instead of returning base64). Returns: Single image with base64 data (or saves to file if outputPath provided).
- render_page Render a PDF page as an image at specified DPI. Parameters: pdfId (string), pageNumber (number, 1-indexed), dpi (number, optional, default: 96), format (string, optional, 'png' or 'jpeg', default: 'png'), outputPath (string, optional - save image to file instead of returning base64). Returns: Rendered page image with base64 data, dimensions, and format (or saves to file if outputPath provided).
- render_pages Render multiple PDF pages as images. Parameters: pdfId (string), pageNumbers (array of numbers, optional - renders all pages if not provided), dpi (number, optional, default: 96), format (string, optional, 'png' or 'jpeg', default: 'png'), outputPath (string, optional - save images to files instead of returning base64). Returns: Array of rendered page images with base64 data (or saves to files if outputPath provided).
Links
★ 4 GitHub stars