Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

PDF File Issue
Started by Antonio T at 08-20-2008 4:30. Topic has 3 replies.

Print Search « Previous Thread Next Thread »
  08-20-2008, 4:30
Antonio T is not online. Last active: 10/16/2008 12:11:11 PM Antonio T

Top 150 Posts
Joined on 08-19-2008
Posts 18
PDF File Issue
Reply Quote
When i setup my twainsession transfer options to scan to a pdf file and set the fileformat to raspdf , it scans and creates the file no problem , but if i try to then open the file in acrobat i get the following error.

Adobe Reader could not open 'test.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)

I can only assume I must be setting up transfer options incorrectly , however this method works when i save the scan as a jpeg or any of the other formats i have tried so far.

i used the following code...

Dim opts As TwainTransferOptions = _twainSession.TransferOptions

opts.TransferMode = TwainTransferMode.File
opts.FileName = "c:\test.pdf"
opts.FileFormat = RasterImageFormat.RasPdf
opts.CompressionMode = TwainCompressionMode.Jpeg

_twainSession.TransferOptions = opts

Is there something else that needs to be done to scan to a pdf file ?
   Report 
  08-20-2008, 5:22
Maen Hasan is not online. Last active: 1/8/2009 5:45:48 PM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,880
Re: PDF File Issue
Reply Quote
If you try to open the result PDF file using any of LEADTOOLS demos, do you face the same problem?

Thanks,
Maen Badwan
LEADTOOLS Technical Support

   Report 
  08-20-2008, 6:05
Antonio T is not online. Last active: 10/16/2008 12:11:11 PM Antonio T

Top 150 Posts
Joined on 08-19-2008
Posts 18
Re: PDF File Issue
Reply Quote
The leadtools main 32 bit project opens the pdf without issue.

Is there a discrepancy in the pdf file format used between leadtools and adobe ?
   Report 
  08-20-2008, 10:51
Maen Hasan is not online. Last active: 1/8/2009 5:45:48 PM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,880
Re: PDF File Issue
Reply Quote
I do not think many Twain drivers support saving PDF file format, so the file you got is most likely a different format, not really PDF. Our toolkit can open many file formats such as TIFF, BMP and JPEG even if they are saved with a different extension such as .PDF.

If you would like to save the scanned images to PDF format, you have to use LEADTOOLS save functions. For each image acquired by the currently selected TWAIN source, an AcquirePage event is generated.

This event gives you the ability to get the acquired image and save it to PDF format using the RasterCodecs.Save Method.
For more information, please refer to the LEADTOOLS .Net documentation.

Of course this only works if you own the LEAD PDF plug-in.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
Post
LEAD Support Fo... » Developer » PDF » PDF File Issue

Powered by Community Server, by Telligent Systems