Save PDF as an image
This time, I will explain how to save the saved PDF as an image file.
"Extract images from PDF" Action details
This time, the action to use is the action of "extracting images from PDF".
The action has the following parameters.
Parameter name | value |
---|---|
PDF file | PDF file path to be extracted as an image |
Extracting page | Select whether to print all pages or to print in page units |
Image name | File name of extracted image |
Save images | Pass to save extracted images |
implemented with copy and paste
We have prepared a sample flow to save files extracted from the PDF files stored in the public document to the same folder.
Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.
Pdf.ExtractImagesFromPDF.ExtractImages PDFFile: $'''C:\\Users\\Public\\Documents\\target.pdf''' ImagesName: $'''converted''' ImagesFolder: $'''C:\\Users\\Public\\Documents'''
Operate and implement Power Automate Desktop
Enter "Image from PDF" from "Search Action".
Set the parameter as follows
Parameter name value PDF file C:\Users\Public\Documents\target.pdf Extract page all Image name converted Image storage destination C:\Users\Public\Documents By execution, the image file extracted from the specified PDF file is saved.
The exception that can occur
An error that can occur is when the PDF is applied to the PDF.If the password is not set, or if the password is different, even if it is a PDF with a password, an error will occur.
In addition, if each file path is wrong, or if the image data cannot be obtained well from the PDF, an error may occur.
If the image is not required, we recommend that you implement the block process.