Print Page | Close Window

Problems writing images to PDF document

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=910
Printed Date: 17 May 24 at 4:52AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Problems writing images to PDF document
Posted By: pdfuser
Subject: Problems writing images to PDF document
Date Posted: 17 Jun 08 at 2:46PM
I am using an older version of iSed.dll (3/2/2004) .  
 
I am extracting the images from a multipage .tiff file into a standalone temperoray single image file. I am having problems writing images to the pdf document. I am reading the image from a single image file using AddImageFromFile. The smaller images (4KB) seem to write ok but larger (25KB) images dont get written to PDF doc. It seems as if the AddImageFromFile is reading it but ImageHeight and ImageWidth are 0.
 
I tried to get iSEDQuickPDF.dll v 5.22 dated 1/3/07  from the download page but I cannot register it. I get an error saying that "dll is loaded but cannot be registered. No entry point for the dll".
 
Please help.



Replies:
Posted By: Ingo
Date Posted: 18 Jun 08 at 2:05AM
Hi!

I've answered already via mail but ...
It's not necessary for dlls to have an entry point ... it's not a must.
With version 5.21 i've made a lot of "tiff to pdf" samples and i don't have the problems you has described - even with "xx mb-images".
Why do you work with single images?
With QP you can get the multipage-tiff one time and then selecting each page.

Perhaps you can post a snippet from your relevant code here and we can look on it ...

Best regards,
Ingo



Posted By: pdfuser
Date Posted: 18 Jun 08 at 9:55AM
have sent you the code snippet via email.


Posted By: Ingo
Date Posted: 18 Jun 08 at 10:10AM
Hi!

I've posted it here - so more than one can look on it ;-)
I think there's something missing between assign iret and drawimage...
First you had written that you're working with multipage-tiffs - in your syntax the pagenumber is missing. What means extension fim? ...Is tif behind? If "yes" take *.tif and pagenumbers. There's no need for an offset then.

Best regards,
Ingo

Here is my sample code..I am using v5.22 Activex dll. c:\Images.fim is a tiff file that contains multiple images.
 
DEFINE iRet as integer.
 
CREATE "iSED.QuickPDF" hQP NO-ERROR.

hQP:UnlockKey("UnlockKey").
 
hQP:SetOrigin(1).
hQP:SetScale(72 / 600).
 
ASSIGN iRet = hQP:AddImageFromFileOffset("c:\Images.fim",
                                                            803723,
                                                            23125,
                                                            0).

/* Here iRet returns has a valid number which means it can load the image */
 
hQP:DrawImage(600,
                      300,
                      1842,
                      813).
             
/* does not draw anything. When I try to display ImageWidth and ImageHeight they both
   are zero */
  
hQP:SaveToFile("C:\test.pdf").
 
/*when I open test.pdf. I get an error. "There was a problem reading this document (12)"*/
 
 
Could there be a problem with the image itself? But the image can be extracted and opened with other Image applications
using same offsets.



Posted By: pdfuser
Date Posted: 18 Jun 08 at 10:31AM

Sorry, it is not a multipage. fim is the file that contains all the images. It is a tif file but named as fim. I am not sure what you mean by *.tif and pagenumbers?



Posted By: Ingo
Date Posted: 19 Jun 08 at 1:51AM
Hi!

You should read the documentation (it's in the library-section here).
I'm a bit confused... it's not a multipage but it's a tif with all images inside. It's a tif buit the extension is fim...?
Even if it's not a multi... you should try a "1" at "options".
I don't know how QP check what type of image it is - if QP only checks the extension then that's the problem ...
Perhaps you can try a further step using AddTIFFImageFromString ...?
I think there's a lot to try for you ;-)

Good luck,
Ingo




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