Hi there!
So I installed the SDK and tried out the demos and was very impressed, especially with the OCR demo, which is exactly what my company needs. With the SDK is it also possible to extract images from a predefined box (exactly like it works with text)? So basically the exact same thing as OCR, but images...
Extracting an image from a pre-defined area of the PDF
Re: Extracting an image from a pre-defined area of the PDF
Any updates on this functionality?
Re: Extracting an image from a pre-defined area of the PDF
Hello,
I can see several option depending what you really need to achieve.
1- If you want to extract a full embedded image, drawn in a specific rectangle:
- Loop to all images in the page, extracting they coordinates. Please use the GetPageImageCoordinates() method. see: https://www.gdpicture.com/guides/gdpicture/web ... nates.html
- If the coordinates are located within the rectangle, extract this image. This can be done using the ExtractPageImage() method. see:
https://www.gdpicture.com/guides/gdpicture/web ... Image.html
2- If you want to capture the region of a page:
- Rasterize the page to a GdPicture image. Please use the method RenderPageToGdPictureImage(). See: https://www.gdpicture.com/guides/gdpicture/web ... Image.html
- Extract the region of the rendered bitmap. For such pourpose you may want to use the GdPictureImaging class and its CreateClonedGdPictureImageArea() method. See:
https://www.gdpicture.com/guides/gdpicture/web ... eArea.html
I hope this helps.
Please just let us know if you need further information or assistance.
With best regards,
Loïc Carrère
I can see several option depending what you really need to achieve.
1- If you want to extract a full embedded image, drawn in a specific rectangle:
- Loop to all images in the page, extracting they coordinates. Please use the GetPageImageCoordinates() method. see: https://www.gdpicture.com/guides/gdpicture/web ... nates.html
- If the coordinates are located within the rectangle, extract this image. This can be done using the ExtractPageImage() method. see:
https://www.gdpicture.com/guides/gdpicture/web ... Image.html
2- If you want to capture the region of a page:
- Rasterize the page to a GdPicture image. Please use the method RenderPageToGdPictureImage(). See: https://www.gdpicture.com/guides/gdpicture/web ... Image.html
- Extract the region of the rendered bitmap. For such pourpose you may want to use the GdPictureImaging class and its CreateClonedGdPictureImageArea() method. See:
https://www.gdpicture.com/guides/gdpicture/web ... eArea.html
I hope this helps.
Please just let us know if you need further information or assistance.
With best regards,
Loïc Carrère
Who is online
Users browsing this forum: No registered users and 1 guest