PDF To Image
Description
Converts a PDF page(s) to an image(s). A new column is created for the results.
Requires the user to specify the PDF as binary data.
Use
- Output field:
- Enter an output field name.
- PDF File:
- Select an argument. (BINARY) (PDF to binary)
- Pages: (Required)
- Enter the page numbers of the PDF to convert to an image.
- Page numbers start at 1.
- If the PDF has seven pages and the intended result is an image of the fifth page, enter "5" as the page value.
- Enter multiple pages:
- Mark the radio button below that the function is not expecting a single image.
- Enter pages separated by comma.
- E.g. 1,3,5,7
- Enter a spread of pages separated with a dash.
- E.g. 1-7
- Multiple pages are converted to a LIST(BINARY_DATA) data type.
- To separate each image from the LIST, use the function Flatten List.
- If page numbers are entered that do not exist, the tuple is dropped and the Flow fails if configured on Strict execution mode.
- Page numbers can also be assigned through an existing input field. Click the arrows icon to switch to a drop-down selection of input STRING fields.
- If the input field containing the page numbers is not a string, it is possible to first turn that input field into a string field using the Concat function.
- The STRING field data is used the same as if entering the values manually.
- Enter the page numbers of the PDF to convert to an image.
- Expecting a single image:
- Yes - The result is a single image of the PDF page number specified above.
- If Yes, is selected and multiple page values are entered, only the first page value entered is converted to an image.
- No - The result is multiple images from multiple pages in the PDF.
- The field data type is converted from BINARY_DATA to LIST(BINARY_DATA)
- Yes - The result is a single image of the PDF page number specified above.
- Image format:
- Select returned image format.
- PNG, JPEG, BMP
- Select returned image format.
- DPI:
- Enter the DPI value.
- The DPI value and the PDF's physical size define the resolution of the output image.
- Enter the DPI value.
PDF forms that are using XML Forms Architecture (XFA) are not supported.
Automation Hero recommends using either the PDF Extract Text function or a different type of form to extract the required data.
Example
If your backend system does not support PDF files, this function could be used to turn PDF files into an image file and then have OCR extract the data for use in an automated Flow.