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 : Friday, October 2, 2009 3:40:15 AM(UTC)
a.bologni

Groups: Registered
Posts: 17


Hi, I'm an Lead Tools user. I use the Lead Tools Library for read and write datamatrix in tiff file.
I would like to know if i can convert tiff file into pdf file with or without pdf plugin of Lead Tools.
If I need pdf plugin for do this, Can I have an evaluation copy to test my code?

Thanks.

A.

 

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 : Sunday, October 4, 2009 1:35:38 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,040

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

To save as PDF you will need the PDF plug-in (Write).
If you would like to test the plug-in send your LEADTOOLS serial number to support@leadtools.com and mention this forum post.
Please do not post your serial number here.

 
#3 Posted : Wednesday, October 28, 2009 5:43:34 AM(UTC)
a.bologni

Groups: Registered
Posts: 17


Hi. I have bought the PDF plug-in write for save in PDF Format.
I have tried to use this feature with this code:


Leadtools.RasterSupport.Unlock(RasterSupportType.Pro, "**MY SERIAL**");
Leadtools.RasterSupport.Unlock(RasterSupportType.PdfSave, "**MY SERIAL**");
Leadtools.RasterSupport.Unlock(RasterSupportType.PdfRead, "**MY SERIAL**");

Leadtools.Codecs.RasterCodecs codecs = new RasterCodecs();
MemoryStream fStream = new MemoryStream(buff);
Leadtools.Codecs.CodecsImageInfo info = codecs.GetInformation(fStream, true);
Leadtools.RasterImage _image = codecs.Load(fStream, 0, Leadtools.Codecs.CodecsLoadByteOrder.BgrOrGray, 1, info.TotalPages);
codecs.Save(_image, _imageLocalPath, RasterImageFormat.RasPdfG4, 1);


but when I try to save I have the Exception : "{"Feature not supported"}".

What's the problem???

Thanks.


A.
 
#4 Posted : Thursday, October 29, 2009 12:22:53 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,040

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

"Feature not supported" error message usually means that you are missing a required DLL to save the image. In your case, you are saving as PDF, which means you will need to include Leadtools.Codecs.Pdf.DLL and Leadtools.Codecs.Fax.DLL.

For more information, please see the help topic "Files to be Included with Your Application" in our .NET help file.

 
#5 Posted : Thursday, October 29, 2009 12:51:35 AM(UTC)
a.bologni

Groups: Registered
Posts: 17


Yes, I have included the two DLL (LeadTools.Codecs.Fax.dll and Leadtools.Codecs.Pdf.dll) and now I have a different error in my application:

"Leadtools.RasterException: Not able to open file
   in Leadtools.RasterException.CheckErrorCode(Int32 code)
in Leadtools.Codecs.RasterCodecs.SaveOnePage(Int32 page, SaveParams saveParams)
in Leadtools.Codecs.RasterCodecs.DoSave(SaveParams saveParams)
in Leadtools.Codecs.RasterCodecs.Save(RasterImage image, String fileName, RasterImageFormat format, Int32 bitsPerPixel, Int32 firstPage, Int32 lastPage, Int32 firstSavePageNumber, CodecsSavePageMode pageMode)
in TwainScanner.testPdf() in c:\Documents and Settings\Administrator\Desktop\Projects-Twain-PDF\TwainWS\Web\App_Code\TwainScanner.cs:riga 167"

Where Can I view the Help Topic "Files to be Included with Your Application"?

Thanks.

A.
 
#6 Posted : Thursday, October 29, 2009 4:28:56 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,040

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

Where do you get this error message exactly? On what line of code?
You were able to load the PDF file, and you received the error message 'Feature not supported'. So does this problem happen with one PDF file? or all of your files?

If only one file, can you please send it to me. You can post it here or send it to support@leadtools.com and mention this forum post.

About the help file "Files to be Included with Your Application", you can find it in our .NET help file if you search for it. The help file is available in the following directory if you are using LEADTOOLS V16.5:
[Program Files\LEAD Technologies\LEADTOOLS 16.5\Help\Dotnet]
 
#7 Posted : Thursday, October 29, 2009 4:48:06 AM(UTC)
a.bologni

Groups: Registered
Posts: 17


The code that I execute is:

        Unlock(false);
        RasterCodecs.Startup();

        string FileName = "C:\\Inetpub\\wwwroot\\FILE.tif";

        RasterCodecs codecs = new RasterCodecs();
        RasterImage _image;
        _image = codecs.Load(FileName, 0, CodecsLoadByteOrder.BgrOrGray, 1, 1);

        // initialize the codecs object
       
        RasterImageFormat _format;
        int _firstPage;
        int _lastPage;
        int _savePageNumber;
        CodecsSavePageMode _pageMode;
        int _fileSubTypeIndex;
        int _bitsPerPixel;

        _format = RasterImageFormat.RasPdfG4;
        _firstPage = -1;
        _lastPage = -1;
        _savePageNumber = -1;
        _pageMode = CodecsSavePageMode.Append;
        _fileSubTypeIndex = 3;

        _bitsPerPixel = 1;
        _savePageNumber = 1;
        _firstPage = 1;
        _lastPage = 1;

        codecs.Options.Jpeg.Save.QualityFactor = 0;
        codecs.Options.Jpeg.Save.SaveWithStamp = false;
        codecs.Options.Jpeg.Save.StampWidth = 120;
        codecs.Options.Jpeg.Save.StampHeight = 120;
        codecs.Options.Jpeg.Save.StampBitsPerPixel = 0;

        codecs.Save(_image,
                  "",
                  _format,
                  _bitsPerPixel,
                  _image.Page,
                  _image.Page,
                  _savePageNumber,
                  _pageMode);


The Exception is generated when I execute the codecs.Save function.
I have tried with other tiff file but the result is the same.
I have the leadtools licence for "RasterImage Pro" "Plugin Pdf Read" "Plugin Pdf Write".

Thanks

A.
 
#8 Posted : Thursday, October 29, 2009 6:43:39 AM(UTC)

Basel  
Guest

Groups: Guests
Posts: 3,040

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

Are you passing an empty string in the second parameter of the save function? If yes, then this might be the problem. You have to pass a string for the path and the file name to be saved correctly.

For example, use @"C:\Temp\FileName.PDF".

 
#9 Posted : Thursday, October 29, 2009 6:52:35 AM(UTC)
a.bologni

Groups: Registered
Posts: 17


Ok ... I know.... I'm a stupid man....
Sorry.

It work's.

Thanks.

A.
 
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-2020, Yet Another Forum.NET
This page was generated in 0.368 seconds.