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, April 5, 2021 8:15:26 AM(UTC)

jedc  
jedc

Groups: Registered
Posts: 1


Hello,

We're using leadtools to convert image to PDF, and as we call the InsertPages method in Leadtools.Forms.Ocr.Advantage.OcrPageCollection, I'm getting the following error:
"External component has thrown an exception."

with the following stack trace:

at L_RedirectedClose(L_HFILE__* )
at L_RedirectedClose(L_HFILE__* fd)
at fltFreeDataPDF(Void* , DATATYPE )
at Leadtools.Codecs.Pdf.PdfCodec.fltFreeData(IntPtr data, Int32 dataType)
at ?A0x7815e18b.ManagedFLTFREEDATA(Int32 fmt, Void* data, DATATYPE dataType)
at L_FreeFilterData(Int32 , Void* , UInt64 , Int32 )
at Leadtools.Codecs.CodecsFilterData.~CodecsFilterData()
at Leadtools.Codecs.CodecsFilterData.Dispose(Boolean )
at Leadtools.Codecs.CodecsFilterData.Dispose()
at Leadtools.Codecs.RasterCodecs.DoLoad(LoadParams loadParams)
at Leadtools.Forms.Ocr.Advantage.OcrPageCollection.InsertPages(Int32 pageIndex, String fileName, Stream stream, Uri uri, Int32 imageFirstPageNumber, Int32 imageLastPageNumber, OcrProgressCallback callback)
at Leadtools.Forms.Ocr.Advantage.OcrPageCollection.InsertPages(Int32 pageIndex, Stream stream, Int32 imageFirstPageNumber, Int32 imageLastPageNumber, OcrProgressCallback callback)


We are using Leadtools 19.0.4.0. Our project's platform target is set to x64. Let me know if you need additional information.

I've been reading the other topics but I could not find something similar to this.

I appreciate your guidance.

Thanks
 

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, April 5, 2021 3:36:26 PM(UTC)
Marcus Andra

Groups: Registered, Manager, Tech Support, Administrators
Posts: 107

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

Hello,

Thanks for reaching out to us. Are you getting this exception when testing with a specific file format? Are you able to replicate this exception with different file types?

What is the behavior you are seeing when testing a conversion with the DocumentConverter demo? C:\LEADTOOLS 19\Shortcuts\Document Converter\.NET Class Libraries
The exception you provided is making me believe your issue is related to a runtime exception. For the Startup method, did you include all of the runtime files needed for the engineDir parameter?
https://www.leadtools.com/help/leadtools/v19/dh/fo/iocrengine-startup.html

Thanks,
Marcus Andra
Developer Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Thursday, April 15, 2021 11:21:34 AM(UTC)
lesleyharrell742

Groups: Registered
Posts: 1


Originally Posted by: Marcus Andra Go to Quoted Post
Hello,

Thanks for reaching out to us. Are you getting this exception when testing with a specific file format? Are you able to replicate this exception with different file types?

What is the behavior you are seeing when testing a conversion with the DocumentConverter demo? C:\LEADTOOLS 19\Shortcuts\Document Converter\.NET Class Libraries
The exception you provided is making me believe your issue is related to a runtime exception. For the Startup method, did you include all of the runtime files needed for the engineDir parameter?
https://www.leadtools.com/help/leadtools/v19/dh/fo/iocrengine-startup.html worktime

Thanks,


Hey! How can I check if I have ALL engineDir parameters enabled?
 
#4 Posted : Thursday, April 15, 2021 2:44:36 PM(UTC)
Marcus Andra

Groups: Registered, Manager, Tech Support, Administrators
Posts: 107

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

Originally Posted by: lesleyharrell742 Go to Quoted Post
Hey! How can I check if I have ALL engineDir parameters enabled?


Hello,

You can check that the IOcrEngine is working correctly and ready to be used through the IsStarted Property. The engineDir parameter simply points to the path where the OcrAdvantageRuntime folder exists on your development machine. When installing the LEADTOOLS SDK, by default this follows this path: C:\LEADTOOLS 19\Bin\Common\OcrAdvantageRuntime.

For debugging purposes, you can approach starting the OCR engine like so:

Code:

using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false)) 
   { 
     ocrEngine.Startup(null, null, null, @"C:\LEADTOOLS 19\Bin\Common\OcrAdvantageRuntime");
     // Show that the engine has started fine 
      Console.WriteLine("OCR Engine Status: ", ocrEngine.IsStarted);
   }


Do note that if you are using the latest v21 SDK, the OCR engines are named differently but the approach remains the same.
https://www.leadtools.com/help/sdk/v21/dh/fo/iocrengine-startup.html
Marcus Andra
Developer 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.