pdf_to_image
Convert PDFs and scanned images into JPG, PNG, WebP, or TIFF files, using OCR for scanned documents and optional page or region selection.
Instructions
Convert PDF and scanned images to various image formats (JPG, PNG, WebP, TIFF).
Ref:
- https://developer.pdf.co/api/pdf-to-image/jpg.md
- https://developer.pdf.co/api/pdf-to-image/png.md
- https://developer.pdf.co/api/pdf-to-image/webp.md
- https://developer.pdf.co/api/pdf-to-image/tiff.md
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to the source file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files. | |
| lang | No | Language for OCR for scanned documents. Default is 'eng'. See PDF.co docs for supported languages. (Optional, Default: 'eng') | eng |
| name | No | File name for the generated output. (Optional) | |
| rect | No | Defines coordinates for extraction (e.g., '51.8,114.8,235.5,204.0'). (Optional) | |
| type | No | Type of image to convert to. (jpg, png, webp, tiff) (Optional) | jpg |
| pages | No | Comma-separated page indices (e.g., '0, 1, 2-' or '1, 3-7'). Use '!' for inverted page numbers (e.g., '!0' for last page). Processes all pages if None. (Optional) | |
| unwrap | No | Unwrap lines into a single line within table cells when lineGrouping is enabled. Must be true or false. (Optional) | |
| api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) | |
| password | No | Password of the PDF file. (Optional) | |
| profiles | No | Extra engine options for this endpoint as a JSON object encoded in a string. The options differ per endpoint; see https://developer.pdf.co/api/profiles. (Optional) | |
| expiration | No | Lifetime of the output link in minutes; the output file is deleted afterwards. API default is 60; the maximum depends on the plan. (Optional) | |
| httppassword | No | HTTP auth password if required to access source url. (Optional) | |
| httpusername | No | HTTP auth user name if required to access source url. (Optional) | |
| line_grouping | No | Enables line grouping within table cells when set to '1'. (Optional) | 0 |