Print Page | Close Window

How to get an Image (Tiff) into a new PDF

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=557
Printed Date: 26 Jun 24 at 3:26AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: How to get an Image (Tiff) into a new PDF
Posted By: John Sigoloff
Subject: How to get an Image (Tiff) into a new PDF
Date Posted: 04 Nov 06 at 9:05PM

Hi,

Tried the following to add an Image with no luck...

QP.NewDocument;

QP.CompressImages(1);

ImageID := QP.AddImageFromFile('C:\temp.tif', 0);

QP.SelectImage(ImageID);

QP.SelectPage(1);

QP.DrawScaledImage(0,0,0.1);

QP.SaveToFile(fn);

Thanks John

 

 




Replies:
Posted By: JanN
Date Posted: 05 Nov 06 at 7:14AM
The documentation for AddImageFromFile says:

"For multi-page TIFF images this parameter specifies the page number to load. For other image types this parameter should be set to 0."

You should try to set the second parameter to 1.

ImageID := QP.AddImageFromFile('C:\temp.tif', 1);



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