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, June 4, 2018 7:32:14 AM(UTC)

Jerry F  
Jerry F

Groups: Registered
Posts: 2


Using this demo project as a starting point I'm trying to evaluate this product for purchase. Unfortunately things aren't working quite right. See screenshot.

https://kek.gg/i/7Y-p_W.png

Any ideas?
 

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 : Monday, June 4, 2018 11:18:04 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Jerry,

Are you referencing the LEADTOOLS Nugets in your project here, and if so, which ones have you included? If you're not using our Nugets, what libraries do you have included in your project?

Also, what line of code is generating this error? It looks like a missing DLL such as Leadtools.Pdf.dll or Leadtools.Pdf.Utilities.dll

I also posted a .NET Standard project a while back. Perhaps this might help to look at as well?
https://www.leadtools.com/support/forum/posts/t12357-HOW-TO--Minimum-OCR-demo-using--NET-Standard
Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Thursday, June 14, 2018 5:38:08 AM(UTC)

Jerry F  
Jerry F

Groups: Registered
Posts: 2


I managed to get it worked out (I think). Are there any examples out there of embedding the OCR result into the PDF that was OCR'd so that it's resting behind the Image? Eg - something like what you'd experience using Adobe Pro OCR function?
 
#4 Posted : Monday, June 18, 2018 11:18:03 AM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 366

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

Hello Jerry,

What you're looking for is in the DocumentWriters options, specifically the PdfDocumentOptions. You should set the ImageOverText property to true. There is some sample code in the documentation under the PdfDocumentOptions constructor.

Check out the SetPDFOptions() code snippet listed above the Example code which has this:
Code:
void SetPDFOptions(DocumentWriter documentWriter, bool useImageOverText) 
{ 
   // Get the current PDF options 
   PdfDocumentOptions pdfOptions = documentWriter.GetOptions(DocumentFormat.Pdf) as PdfDocumentOptions; 
             
   // Use JBIG2 for B/W images 
   pdfOptions.OneBitImageCompression = OneBitImageCompressionType.Jbig2; 
   // Use JPEG2000 or Flate for colored images 
   pdfOptions.ColoredImageCompression = ColoredImageCompressionType.FlateJpx; 
   // Embed fonts automatically 
   pdfOptions.FontEmbedMode = DocumentFontEmbedMode.Auto; 
             
   if (useImageOverText) 
   { 
      // Use image over text 
      pdfOptions.ImageOverText = true; 
      // Re-size the overlay image by 2 
      pdfOptions.ImageOverTextSize = DocumentImageOverTextSize.Half; 
      // Convert grayscale to black and white if possible 
      pdfOptions.ImageOverTextMode = DocumentImageOverTextMode.Relaxed; 
      // Use quality factor of 50 
      pdfOptions.QualityFactor = 50; 
   } 
   else 
   { 
      // Will not use image over text 
      pdfOptions.ImageOverText = false; 
      // Use quality factor of 100 
      pdfOptions.QualityFactor = 100; 
   } 
             
   // Set our options 
   documentWriter.SetOptions(DocumentFormat.Pdf, pdfOptions); 
}
Walter Bates
Senior Support Engineer
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.082 seconds.