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 : Thursday, July 14, 2005 11:13:52 AM(UTC)
darius_tajanko

Groups: Registered
Posts: 5


Hello, I am evaluating v14 ActiveX. How can I save a multi-page image to a PDF file? I thought I'd be able to do it using the .SaveToFile method of the ImageList control. It is giving me an error.

Thanks.

--DT

 

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, July 17, 2005 7:55:14 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

Hello,

What is the exact error that you got when trying to save multi-page image to PDF file format?
Can you add a code snippet that shows how exactly you are saving to PDF forma?

However, the following code shows how to save a multi-page TIFF file to a Multi-page PDF file by using LEADTOOLS OCX programming interface:
+------------------------------------------------------+
i = LEAD1.Load("j:\images\fax1.tif", 0, 1, -1)
For i = 0 To LEAD1.BitmapListCount - 1
LEAD1.BitmapListIndex = i
LEAD1.Save "c:\testtest1.PDF", FILE_RAS_PDF_G4, 1, 2, SAVE_APPEND
 '  LEAD1.Save "c:\test2.tif", FILE_TIF, 1, 2, SAVE_APPEND
Next i
+------------------------------------------------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support

 
#3 Posted : Monday, July 18, 2005 6:31:16 AM(UTC)
darius_tajanko

Groups: Registered
Posts: 5


Maen, thanks for your reply. I have since switched to the Raster COM object but still no luck. My code is this:

 

    intBitmapBits = GetBitmapBits()   '-- get color bits
   
    If intBitmapBits = 1 Then    '-- black & white
        intFormat = FILE_RAS_PDF_G4
    Else
        intFormat = FILE_RAS_PDF_JPEG
    End If

    LEADRasterImgList1.SaveToFile strFileName, intFormat, intBitmapBits, 0, False

 

I get:

 

? error
LEAD Error: Invalid file format
? err
 20009

 
#4 Posted : Wednesday, July 20, 2005 6:28:04 AM(UTC)

Otis  
Guest

Groups: Guests
Posts: 3,022

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

Thank you for contacting LEADTOOLS. The Imagelist control does not support saving out to all of our formats. if you would like to save as PDF, you should use the main raster object.

dim io as new LEADRasterIO

i = io.Load LEADRasterView1.Raster, "c:\images\multi.tif", 0, 1, -1

For i = 0 To  LEADRasterView1.Raster.BitmapListCount - 1
 LEADRasterView1.Raster.BitmapListIndex = i
 io.Save "c:\testtest1.PDF", FILE_RAS_PDF_G4, 1, 2, SAVE_APPEND
Next i

 
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.065 seconds.