images_to_pdf
Assemble pictures into one PDF, a page per picture, in the order supplied. PNG and JPEG bytes are embedded untouched; WebP, GIF, TIFF and AVIF are re-encoded to PNG on the way in, which loses no detail but does rewrite the file. A PDF sitting among the pictures is spliced in whole at its position, so a photo/contract/photo sequence takes one call. Each page defaults to the pixel dimensions of its picture, so nothing is scaled, cropped or letterboxed; choose 'a4' or 'letter' instead to centre every picture on a fixed portrait sheet, optionally inside a margin of blank points. Ceilings per call: 100 files, and 50MB summed across all of them, at 20 calls an hour per IP. Bytes that cannot be decoded as a picture — a spreadsheet, a video, a corrupt upload — earn an HTTP 400 naming the offending file; a blank page is never substituted to hide one. Output is the finished PDF: raw bytes over REST, and over MCP a link to the stored document that keeps working for roughly a day. MCP carries no attachments, so name the pictures with fileUrls — an ordered array of links inside razi.pro's own storage. Links elsewhere on the internet are refused. Mint them by POSTing the pictures to /api/v1/tools/execute first, where they may simply be attached.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| margin | No | Blank border in points (72 to the inch) kept clear on every side. Default 0. With 'a4' or 'letter' it shrinks the area the picture is fitted into; with 'fit' it enlarges the page around the picture instead. | |
| pageSize | No | Page geometry. 'fit' (default) makes each page exactly as many points as its picture has pixels, preserving the aspect ratio with no empty space. 'a4' (595x842pt) and 'letter' (612x792pt) use a fixed portrait sheet and centre the picture on it, scaling it up or down to fit; the leftover space is blank. |