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!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > I need help - I can help
  New Posts New Posts RSS Feed - Insert More Images
  FAQ FAQ  Forum Search   Register Register  Login Login

Insert More Images

 Post Reply Post Reply
Author
Message
mabermeo View Drop Down
Beginner
Beginner


Joined: 22 Sep 11
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote mabermeo Quote  Post ReplyReply Direct Link To This Post Topic: Insert More Images
    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!
Back to Top
Ingo View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 29 Oct 05
Status: Offline
Points: 3524
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ingo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Sep 11 at 8:27PM
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

Back to Top
AndrewC View Drop Down
Moderator Group
Moderator Group
Avatar

Joined: 08 Dec 10
Location: Geelong, Aust
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote AndrewC Quote  Post ReplyReply Direct Link To This Post Posted: 26 Sep 11 at 5:19AM
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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store