Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!
Insert More Images |
Post Reply |
Author | |
mabermeo
Beginner Joined: 22 Sep 11 Status: Offline Points: 1 |
Post Options
Thanks(0)
Posted: 22 Sep 11 at 1:51AM |
Hi!
i need Add more images .tif in only one file .pdf 'c:\001-EXP3.tif = multitif 13 images Code: Call QP.AddImageFromFile("c:\001-EXP3.tif", 3) '--> 3 = Pag. Num. lWidth = QP.ImageWidth() lHeight = QP.ImageHeight() Call QP.SetPageDimensions(lWidth, lHeight) Call QP.DrawImage(0, lHeight, lWidth, lHeight) If QP.SaveToFile("c:\from image.pdf") = 1 Then in the file .PDF only add 1 image not 13 Regards! |
|
Ingo
Moderator Group Joined: 29 Oct 05 Status: Offline Points: 3524 |
Post Options
Thanks(0)
|
Hi Maber!
You have to work with a loop... ...with the QuickPDF-syntax "NewPage", "GetImagePageCount", ... then it will work. Have a look at the online reference here: http://www.quickpdflibrary.com/help/quickpdf/FunctionGroups.php Cheers and welcome here, Ingo |
|
AndrewC
Moderator Group Joined: 08 Dec 10 Location: Geelong, Aust Status: Offline Points: 841 |
Post Options
Thanks(0)
|
Also it is important to remember that ImageWidth and ImageHeight return the width and height of the image in pixels. The SetPageDimensions expects measurements in points where 72points = 1 inch.
You would need to use ImageHorizontalResolution, ImageVerticalResolution and ImageReolutionUnits to calculate the size of the original image. Not all image fomats return a DPI value such as PNG files. for i = 1 to 13 begin if (i <> 1) then QP.NewPage(); // Page 1 is created by default. QP.AddImageFromFile("c:\001-EXP3.tif", i) '--> i = Pag. Num. lWidth = QP.ImageWidth() * 72.0 / QP.ImageHorizontalResolution(); lHeight = QP.ImageHeight() * 72.2 / QP.ImageVerticalResolution(); QP.SetPageDimensions(lWidth, lHeight) QP.DrawImage(0, lHeight, lWidth, lHeight) end; If QP.SaveToFile("c:\from image.pdf") = 1 Then Edited by AndrewC - 26 Sep 11 at 2:47PM |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions 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 |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store