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 : Saturday, August 12, 2006 9:59:18 AM(UTC)

alexll  
alexll

Groups: Registered
Posts: 5


I tried to set:

_rasterOcr.SaveResultOptions.Format = RasterOcrFormatType.Pdf;

But when I open the file with Acrobat Reader, it gives me an error message:

"Adobe Reader could not open 'myFile.pdf' because it is either not a supported file type or because the file has been damaged (...)."

What's wrong? Do I need to set some other property?

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, August 14, 2006 6:15:05 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

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

Do you get the problem when using any of our OCR demos to OCR and save as PDF?  If not, then please post a small test project that shows it.

Thanks,

 
#3 Posted : Monday, August 14, 2006 8:42:03 AM(UTC)

alexll  
alexll

Groups: Registered
Posts: 5





The demos work fine. This happens only in my application.

Also, when I export to any other format it works. Only PDF gives me this error.

I'll attach the part of my code that saves the result.

Btw, I'm using "LEADTOOLS Document Imaging Suite 14.5" (not the trial)
File Attachment(s):
saveOCRSample.txt (1kb) downloaded 37 time(s).
 
#4 Posted : Tuesday, August 15, 2006 4:52:06 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

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

That code fragment looks reasonably correct.  Can you please post a small test project that I can compile and run?

Thanks,

 
#5 Posted : Tuesday, August 15, 2006 8:55:43 AM(UTC)

alexll  
alexll

Groups: Registered
Posts: 5


Here it is. Also, with the same problem.
I placed a jpg image on the application folder to test the conversion to pdf.
The pdf will be generated in the .exe folder

Thanks
File Attachment(s):
OCRToPDF.zip (811kb) downloaded 36 time(s).
 
#6 Posted : Thursday, August 17, 2006 11:18:59 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,022

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

You were setting the result options incorrectly.  You need to create an instance of RasterOcrResultOptions, fill it up with the options, then set the SaveResultOptions property to this instance.  Attached is the modified project.

File Attachment(s):
OCRToPDF.zip (334kb) downloaded 37 time(s).
 
#7 Posted : Friday, August 18, 2006 5:40:40 AM(UTC)

alexll  
alexll

Groups: Registered
Posts: 5


Thank you!
It's working smoothly!
 
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.159 seconds.