Loading...

Error on Save as Pdf of a multipage tiff

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Error on Save as Pdf of a multipage tiff

Postby clio » Sat May 22, 2010 10:49 pm

I have been using the imaging activex for a while and it's been working great. I have come across a problem when converting a multipage tif into a pdf - it only happens to a few files - the code works fine almost all the time. I'm using the ActiveX control in MS Access - I have the control on a form MyForm and from code I'm loading the multipage tiff into the control and attempting to save it as a pdf.

code snippet:
Code: Select all
Dim ImageID As Long

        Forms("MyForm").Imaging1.TiffOpenMultiPageAsReadOnly (True)
        ImageID = Forms("MyForm").Imaging1.TiffCreateMultiPageFromFile(tifFileName)
       
        If ImageID = 0 Then
            errorcode = 1
            errorstr = "Error loading the TIFF file."
            Exit Sub
        End If
        result = Forms("MyForm").Imaging1.SaveAsPDFEx(PDFFileName)
        Forms("MyForm").Imaging1.CloseImage (ImageID)
        If result = False Then
            errorcode = 1
            errorstr = "Error saving image into the PDF file."
            Exit Sub
        End If


An error occurs on the line 'result = ...SaveAsPDFEx...' - with an error description 'Automation error The object invoked has disconnected from its clients.' At that moment I can still use the Imaging object (get page counts, etc - it's GetStat returns 0)

As I say this only happens once in a while and I've tried looking at the tif files to figure out what is different but I haven't had much luck. In at least one case the first page of a bad file is in landscape and the rest of the file is in portrait. Can that cause a problem? I can load the tif into the GDViewer with no trouble - and I've tried flipping all the pages and saving that edit - no change in the error when I try to save as pdf.

I can send an example of a problem tif file if you like.

Thanks for any assistance!

-jennifer
clio
 
Posts: 4
Joined: Wed Jun 10, 2009 12:30 am

Re: Error on Save as Pdf of a multipage tiff

Postby Loïc » Tue May 25, 2010 3:40 pm

Hi Jennifer,

Please send us the image generating this error for investigation.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Error on Save as Pdf of a multipage tiff

Postby clio » Sun May 30, 2010 7:12 pm

Thanks for your assistance - installing the new version of the control did in fact solve the problem.
clio
 
Posts: 4
Joined: Wed Jun 10, 2009 12:30 am


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 2 guests

cron