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 - Add Image to existing PDF
  FAQ FAQ  Forum Search   Register Register  Login Login

Add Image to existing PDF

 Post Reply Post Reply
Author
Message Reverse Sort Order
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 Topic: Add Image to existing PDF
    Posted: 15 Jun 16 at 9:54PM
Hi fmenditto,

i'm missing a SelectImage - Add is not enough.
Try this one (if it's not tiff) and it will work (Delphi):
             image := QP.AddImageFromFile(fstring, 0);
             QP.SelectImage(image);
             QP.SetPageDimensions(QP.ImageWidth,QP.ImageHeight);
             QP.DrawImage(0,0,QP.ImageWidth,QP.ImageHeight);

A NormalizePage could be always good before ;-)

Cheers and welcome here,
Ingo

Cheers,
Ingo

Back to Top
rweetch View Drop Down
Senior Member
Senior Member


Joined: 22 Feb 11
Status: Offline
Points: 173
Post Options Post Options   Thanks (0) Thanks(0)   Quote rweetch Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jun 16 at 7:14PM
does the PDF have mutlple streams? If so it could be drawing to a stream which is hidden by content on a higher stream.
Back to Top
fmenditto View Drop Down
Beginner
Beginner


Joined: 15 Jun 16
Location: Tialy
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote fmenditto Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jun 16 at 11:40AM
I try to add an image to existing pdf file with simple code (vb.net): 
        QP.LoadFromFile("test.pdf", "")
        QP.SelectPage(1)
        Dim id As Integer = QP.AddImageFromFile("test_image.png", 0)
        Dim lWidth As Integer = QP.ImageWidth()
        Dim lHeight As Integer = QP.ImageHeight()
        QP.DrawImage(0, 450, lWidth, lHeight)
        QP.SaveToFile("test_updated.pdf")

But in the result PDFI can't see the image. If I create e new pdf and I add image I can see it.
there is sometihng bad ? 

Thanks 

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