We are wanting to scan an entire PDF for Barcodes. To do this (based on all online samples and demos), each page in the PDF must be converted to a GdPicture object using RenderPageToGdPictureImage/Ex. It appears that this must be done by looping through each page in the document and doing them one by one. This is taking a long time on documents that have several pages (as most of ours do). Trying to run them in a parallel loop leads to inconsistent results (i.e. pages being missed etc). Is there a way to take a GdPicturePdf object and get a collection of GdPictureImage id's in one single call without the looping (like a Render All Pages to GdPictureImage)? I haven't seen anything like that. Or better yet, a way to scan for barcodes without converting the PDF pages to images? I haven't seen anything like that either.
Thanks
Render all pages in PDF to Images concurrently
Re: Render all pages in PDF to Images concurrently
Hello there,
If your PDF is image-based, the best option is to convert your input PDF into a temporary TIF document and loop on its images.
Let me know if this solution does not fit or if you need any help.
Best regards,
Fabio
If your PDF is image-based, the best option is to convert your input PDF into a temporary TIF document and loop on its images.
Let me know if this solution does not fit or if you need any help.
Best regards,
Fabio
Re: Render all pages in PDF to Images concurrently
Is there an easy way in GdPicture to check if a PDF is Image Based? Is the an example of converting the input PDF into a temporary TIF and looping it's pages? What would i need to do inside the loop? Are there any examples?
Re: Render all pages in PDF to Images concurrently
Hello,
To check if your PDF is image-based, you can check:
- If there is some text on the page: https://www.gdpicture.com/guides/gdpict ... lean).html
- If there is an image: https://www.gdpicture.com/guides/gdpict ... nt().html?
If PageHasText == false & GetPageImageCount == 1 you can consider the page is image based.
For converting your PDF into a TIF, you can follow this code snippet: https://www.gdpicture.com/guides/gdpict ... mages.html
Best regards,
Fabio
To check if your PDF is image-based, you can check:
- If there is some text on the page: https://www.gdpicture.com/guides/gdpict ... lean).html
- If there is an image: https://www.gdpicture.com/guides/gdpict ... nt().html?
If PageHasText == false & GetPageImageCount == 1 you can consider the page is image based.
For converting your PDF into a TIF, you can follow this code snippet: https://www.gdpicture.com/guides/gdpict ... mages.html
Best regards,
Fabio
Who is online
Users browsing this forum: No registered users and 1 guest