Print Page | Close Window

AddImageFromFile Error

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=1008
Printed Date: 22 Jul 25 at 3:10PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: AddImageFromFile Error
Posted By: rgoodson
Subject: AddImageFromFile Error
Date Posted: 30 Jan 09 at 8:18PM
Hello, I am trying to convert a large tif file (App. 50 mb) into a pdf file. I am doing this by using the AddImageFromFile function followed by the DrawImage function for each page in the tif file. 
 
During the process, the AddImageFromFile function keeps returning 0 on one of the pages, however the page number on which the error occurs differs every time I run the process. I believe this might have to do with some kind of memory issue, since this doesn't ever happen on smaller files.
 
I am using ised.dll version 5.22.0.145. Do you have any idea why I am receiving this error. I can provide you with the tif file as well as my code if you would like.
 
Thank you for any help you can give me.
 
Reagan



Replies:
Posted By: Ingo
Date Posted: 31 Jan 09 at 6:59AM
Hi Reagan!
 
Perhaps i'm wrong but there are the clone-functions ...
Imagine: A tiff with 50 mb on each of perhaps 100 pages... impossible. What you wanna do with such a document? Who shall open it?  
You should do the AddImage... only one time and then you can use the other functions to install only a reference to these on image.
Please use the serach-function here above and the manual. Thanks.
 
Cheers, Ingo
 


Posted By: rgoodson
Date Posted: 31 Jan 09 at 11:19AM

Hello Ingo,

I am not sure what you mean by "the clone-funtions". Could you please expand on that a little?

The 50 mb tif is a 40-page color tif file using LZW compression. I am trying to save this file as a pdf file, so I am going through each page and calling "AddImageToFile" followed by "DrawImage" to create it. Smaller files work fine, but with these large ones, the "AddImageToFile" returns a 0 during the process at random pages. For instance, sometimes it will error out on page 4, sometimes on page 38, and often times somewhere in the middle.

I have searched through this entire forum and found nobody with this type of issue. Also, I am using the manual, which has been very helpful, but it does not explain any reason for this function erroring out.

I would appreciate any other advice you could give me. Like I said, I can email you the file as well as my code if you would like.
 
Thanks,
Reagan


Posted By: Ingo
Date Posted: 31 Jan 09 at 3:07PM
Hi!
 
I had understand the tiff on each page ... ;-)
But it's only one tiff AS pdf ...
 
Probably the newest version won#t have the described problems but it's too early talking about this. 'Till now you can try to change your kind of working... perhaps not all tiff-pages after one LoadFromFile... perhaps several times a free and then a new create and LoadFromFile and then adding the next few tiff-pages, and so on.
 
Perhaps it could be interesting how big is the pdf-file if you have added one tiff-page?
 
Cheers, Ingo


Posted By: rgoodson
Date Posted: 31 Jan 09 at 4:19PM

Do you know when the new release will be? If it will be anytime soon, I will just wait until it is available and try with it before I start manipulating my code to make it work.

Thanks for your help.
 
Reagan


Posted By: Ingo
Date Posted: 01 Feb 09 at 10:09AM
Hi!
 
Please read here...
http://www.quickpdf.org/forum/forum_posts.asp?TID=991 - http://www.quickpdf.org/forum/forum_posts.asp?TID=991
Still some legal concerns. Sorry.
 
Cheers, Ingo


Posted By: rgoodson
Date Posted: 01 Feb 09 at 11:24AM
Ok. Thanks for your help. I think I will wait for the new version and then revisit this if the new version continues to produce this error.
 
Have a good day.
 
Reagan



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk