Operation thumbnail
The thumbnail operation allows you to create small versions of images or document pages, called thumbnails.
This can be useful if you want to display a large number of images or document pages in a small space.
Available Options
Option Name | Type | Possible Values | Description |
---|---|---|---|
thumbnail_target | string | png, jpg | creates a thumbnail in the Portable Network Graphics (PNG) format or in the Joint Photographic Experts Group (JPEG) format. |
width | integer | Range: 10-500 | Specifies the width of the thumbnail in pixels. You can use either option alone or together with height to specify the thumbnail's aspect ratio. |
height | integer | Range: 10-500 | Specifies the height of the thumbnail in pixels. You can use either option alone or together with width to specify the thumbnail's aspect ratio. |
dpi | integer | Range: 10-300 | Specifies the horizontal and vertical density of the thumbnail image. This is important because it determines the size of the image when it is printed or displayed on a high-resolution screen. |
pages | string | Pattern: ^(((\d+|first)-?(\d*|last))|(first)|(last))(, ?(((\d+|first)-?(\d*|last))|(first)|(last)))*$ | Specifies the page numbers of a document that you want to extract and convert to image thumbnails. This is useful if you only want to create thumbnails of certain pages of a document. You can specify a single page number or a range of pages separated by a hyphen. For example, 1 or 1-3 would create thumbnails of the first and second pages of a document. Aliases like "first" and "last" are also accepted. Note that this option is only applicable to document inputs. |
allow_multiple_outputs | boolean | true, false | If the comparison produces more than one output file, by default all of them are compressed in just one file. Set this option to true if you want a download link for each file. |
Example
{ "conversion": [{ "category": "operation", "target": "thumbnail", "options": { "thumbnail_target": "png", "width": 200, "dpi": 50, "pages": "5-end", "allow_multiple_outputs": true } }], }