[VB.NET/C#] OCR a specific Zone of a PDF page
[VB.NET/C#] OCR a specific Zone of a PDF page
topic moved, see: https://www.gdpicture.com/guides/gdpicture/web ... 0file.html
Re: OCR a specific Zone of a PDF page
Hi Loïc, how are you?
This solves part of the problem. Could you help me with the following?
I need to visualize the document so I'll load into a GDViewer.
I need to use the Thumbnails too.
The document could have more than one Page.
The ROI will be set on the GDViewer
I've try all the possibilities but the correct one (I don't know what it is)
How can I do that?
Again, can you help me?
Regards
Rogerio Picilli
This solves part of the problem. Could you help me with the following?
I need to visualize the document so I'll load into a GDViewer.
I need to use the Thumbnails too.
The document could have more than one Page.
The ROI will be set on the GDViewer
I've try all the possibilities but the correct one (I don't know what it is)
How can I do that?
Again, can you help me?
Regards
Rogerio Picilli
Re: OCR a specific Zone of a PDF page
Hello Roger,
You have to do the following:
- From the GdViewer, extract coordinate of the rectangle of selection in inches. See: GetRectCoordinatesOnDocumentInches() method.
- Then convert the coordinates to pixel, according to the resolution used to rasterize the page.
This should be something like this, for 200 DPI rendering:
Hope this helps!
Kind regards,
Loïc
You have to do the following:
- From the GdViewer, extract coordinate of the rectangle of selection in inches. See: GetRectCoordinatesOnDocumentInches() method.
- Then convert the coordinates to pixel, according to the resolution used to rasterize the page.
This should be something like this, for 200 DPI rendering:
Code: Select all
GdViewer1.GetRectCoordinatesOnDocumentInches(left, top, width, height)
RasterPageID = oGdPicturePDF.RenderPageToGdPictureImage(200, True)
oGdPictureImaging.SetROI(left * 200, top * 200, width * 200, height * 200)
Kind regards,
Loïc
Re: [VB.NET/C#] OCR a specific Zone of a PDF page
Hi,
the link in the initial post is broken. Can you please give me the new link to the sample?
Thanks.
the link in the initial post is broken. Can you please give me the new link to the sample?
Thanks.
Re: [VB.NET/C#] OCR a specific Zone of a PDF page
Here you can find updated code snippet based on GdPicture.NET 14:
How to OCR a specific zone of a PDF document
How to OCR a specific zone of a PDF document
Who is online
Users browsing this forum: No registered users and 1 guest