ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Image processing PDF document
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

emsys

USA
5 Posts

Posted - Dec 20 2021 :  21:46:21  Show Profile  Reply
I need to process scanned pdf documents and split each page into 4 images.

Can you point me in the right direction to do that? I was not able to access the pdf pages once I disabled the ImageEnView PdfViewer. Can I copy the pages from the PdfViewer to IEBitmap in the same ImageEnView? or is it preferable to copy to a second ImageEnView?

The second task that I would like to perform is to OCR the pages - but the information that we are interested in is hand-written.

Does IEVision have any success in OCRing hand-written text?

Thanks for your help,

Elias

emsys

USA
5 Posts

Posted - Dec 21 2021 :  20:23:20  Show Profile  Reply
I found a post that mentioned PdfViewer.DrawTo function, so I implemented that by opening the pdf file in one ImagenEnView and using PdfViewer.DrawTo to copy the page to the IEBitmap of a second ImageEnView. Then I was able to do the image processing in the second ImageEnView.

But when working with the images in the second ImageEnView, I noticed that the resolution seems to be less than the original pdf file. So to check, I saved one page from the pdf file to a jpeg image using Adobe Acrobat and then saved the same page to a jpeg image using ImageEnView. The resolution of the Adobe saved image ended up 1352 x 1749. The ImageEn saved jpeg image has a resolution of 612 x 792.

Are there options to get the higher resolution image from the pdf file using ImageEn?

Thank you,

Elias
Go to Top of Page

xequte

38610 Posts

Posted - Dec 21 2021 :  22:31:10  Show Profile  Reply
Hi Elias

I'm not seeing any advantage to using PdfViewer in your description below.

You can just load the PDF file directly into the TIEBitmap, e.g. by attaching it to a TImageEnIO

https://www.imageen.com/help/TImageEnIO.CreateFromBitmap.html

Then load the PDF at a desired size:


https://www.imageen.com/help/TImageEnIO.LoadFromFilePDF.html


However I don't think you'll have much success OCRing hand written text.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

emsys

USA
5 Posts

Posted - Dec 23 2021 :  00:21:30  Show Profile  Reply
Nigel,

Thank you for the info. I am now using the TImageEnIO.LoadFromFilePDF - and that is working great for both being able to do image processing in ImageEnView and getting the images at higher resolution.

The issue I am having now is that when I save the images to jpeg using the same TImageEnIO that I loaded from the PDF, I am not getting any compression. It doesn't matter what value I set IO->Params->JPEG_Quality to. I get the same jpeg file size.

I saw couple posts mentioning that situation but I have not been able to get it to work.

More thanks for all your help,

Elias
Go to Top of Page

xequte

38610 Posts

Posted - Dec 23 2021 :  04:11:26  Show Profile  Reply
Hi Elias

Please show me your code.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

emsys

USA
5 Posts

Posted - Dec 24 2021 :  13:20:19  Show Profile  Reply
Hi Nigel,

I was using IO->Paramas->TIFFJPEG_Quality in my code and realized that I need to use IO->Params->JPEG_Quality. I thought that I had switched all the code to use JPEG_Quality but I had not.

Now it is working correctly.

Thanks again,

Elias
Go to Top of Page

xequte

38610 Posts

Posted - Dec 26 2021 :  14:44:13  Show Profile  Reply
Thanks for the update.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: