create_images_from_pdf
Convert PDF pages to image files (JPEG, PNG, TIFF) with adjustable width and page selection. Specify page ranges, formats, and output directory.
Instructions
Render PDF pages to image files using the PDF4me CreateImages API (POST /api/v2/CreateImages). Controls width in pixels, image format (jpeg, png, tiff, etc.), and page selection (top-level pageNrs plus imageAction.PageSelection.PageNrs when the expression parses to integers; use 'all' for all pages). Writes one file per page to output_dir (defaults to the input PDF directory).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Local path to the PDF file. | |
| output_dir | No | ||
| page_number | No | Page selection string for top-level pageNrs (e.g. '1', '1-2', '1,3,5'). When parseable, also sent as imageAction.PageSelection.PageNrs. 'all' sends pageNrs only (no PageSelection block). | 1 |
| width_pixel | No | Output image width in pixels (passed as string to imageAction.WidthPixel). | 800 |
| image_extension | No | Output format: jpg, jpeg, bmp, gif, png, tif, tiff, etc. (imageAction.ImageExtension). | jpeg |