PDF to Image Data Item
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-07-20 02:25 AM
Hi.
I'm trying to read a PDF file with the skill "Google Computer Vision" the problem is that I don't know how to convert a PDF file to an "Image" Data Item.
I have an object that converts JPG, PNG to Image, but no PDF files, so if anyone can help me with one of these things:

I really appreciate it. Thanks
------------------------------
Nicolás Wilches Salazar
RPA Developer
EY
America/Bogota
------------------------------
I'm trying to read a PDF file with the skill "Google Computer Vision" the problem is that I don't know how to convert a PDF file to an "Image" Data Item.
I have an object that converts JPG, PNG to Image, but no PDF files, so if anyone can help me with one of these things:
- Convert a PDF file directly to "Image" Data Item
- or
- Convert a PDF file to a JPG file but directly in Blue Prism (with an object or a code in C#)
I really appreciate it. Thanks
------------------------------
Nicolás Wilches Salazar
RPA Developer
EY
America/Bogota
------------------------------
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
01-07-20 05:46 AM
You can use PdfiumViewer https://github.com/pvginkel/PdfiumViewer
You'll have to copy PdfiumViewer.dll and pdfium.dll (in x86 or x64 folder) to BP directory and add reference to PdfiumViewer.dll in BP
Global code
static void Go(string pdfFile, string saveFolder) { using (var pdfDocument = PdfiumViewer.PdfDocument.Load(pdfFile)) { for(int index = 0; index < pdfDocument.PageCount; index++) { var image = pdfDocument.Render(index,300,300, true); image.Save(saveFolder+"Page_"+index.ToString()+".png", ImageFormat.Png); } } }
------------------------------
Gopal Bhaire
Analyst
Accenture
------------------------------
