Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, July 25, 2016 7:22:27 AM(UTC)
username77

Groups: Registered
Posts: 40

Thanks: 5 times

It's possible to convert an raster pdf to searchable pdf maintaining the original format using leadtools v19 demo on .NET (similar to PdfDocumentOptions: ImageOverText=True)?

I'm using this code but original image is not perserved:
IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false);
ocrEngine.Startup(null, null, null, null);
ocrEngine.AutoRecognizeManager.Run("input.pdf", "output.pdf", DocumentFormat.Pdf, null, null);


Thanks in advance
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, July 26, 2016 4:32:07 AM(UTC)

Hadi  
Hadi

Groups: Manager, Tech Support, Administrators
Posts: 218

Was thanked: 12 time(s) in 12 post(s)

You need to set the ImageOverText property of the DocumentWriter's PDFDocumentOptions to true prior to the AutoRecognizeManager.Run method like so:

         IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false);
         ocrEngine.Startup(null, null, null, null);

         PdfDocumentOptions pdfOptions = ocrEngine.DocumentWriterInstance.GetOptions(DocumentFormat.Pdf) as PdfDocumentOptions;
         pdfOptions.ImageOverText = true;
         ocrEngine.DocumentWriterInstance.SetOptions(DocumentFormat.Pdf, pdfOptions);

         ocrEngine.AutoRecognizeManager.Run("input.pdf", "output.pdf", DocumentFormat.Pdf, null, null);

Here is some more information on the PDF Document Options and the Image Over Text Mode:
https://www.leadtools.com/help/leadtools/v19/dh/ft/leadtools.forms.documentwriters~leadtools.forms.documentwriters.pdfdocumentoptions.html
https://www.leadtools.com/help/leadtools/v19/dh/ft/leadtools.forms.documentwriters~leadtools.forms.documentwriters.pdfdocumentoptions~imageovertextmode.html

Also, there is a How To post about the various PDF Options that you can modify/change at this forum post:
http://support.leadtools.com/SupportPortal/CS/forums/44485/ShowPost.aspx

Please let me know if you have any further questions!
Hadi Chami
Developer Support Manager
LEAD Technologies, Inc.

LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.065 seconds.