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!
![]() |
Add Image to existing PDF |
Post Reply ![]() |
Author | |
fmenditto ![]() Beginner ![]() Joined: 15 Jun 16 Location: Tialy Status: Offline Points: 2 |
![]() ![]() ![]() ![]() ![]() 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 |
|
![]() |
|
rweetch ![]() Senior Member ![]() Joined: 22 Feb 11 Status: Offline Points: 173 |
![]() ![]() ![]() ![]() ![]() |
does the PDF have mutlple streams? If so it could be drawing to a stream which is hidden by content on a higher stream.
|
|
![]() |
|
Ingo ![]() Moderator Group ![]() ![]() Joined: 29 Oct 05 Status: Offline Points: 3529 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
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