#1
Posted
:
Monday, June 4, 2018 7:32:14 AM(UTC)
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.pngAny ideas?
#2
Posted
:
Monday, June 4, 2018 11:18:04 AM(UTC)
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-StandardWalter Bates
Senior Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Thursday, June 14, 2018 5:38:08 AM(UTC)
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)
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.
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.