Print Page | Close Window

Merging Image into a 2 page 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=1759
Printed Date: 12 May 25 at 11:19PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Merging Image into a 2 page PDF
Posted By: rweetch
Subject: Merging Image into a 2 page PDF
Date Posted: 07 Mar 11 at 3:45PM
I have a 2 page pdf and am trying to load an image onto the second page. I have a field there as a place holder and the info reporting this seems to be ok, however, the image is displayed in the correct position, but on the first page. The code I am using is:
 
FFID := FieldIdentifier;
FFWidth := PDFLibrary.GetFormFieldBound(FFID, PDFWIDTH);
FFHeight := PDFLibrary.GetFormFieldBound(FFID, PDFHEIGHT)
FFLeft := PDFLibrary.GetFormFieldBound(FFID, PDFLEFT);
FFTop := PDFLibrary.GetFormFieldBound(FFID, PDFTOP);
ImageFile := PdfLibrary.AddImageFromFile(aFileName, 0);
PDFLibrary.FitImage(FFLeft, FFTop, FFWidth, FFHeight, 1, 1, 0);
 
any help greatly appreciated.



Replies:
Posted By: Ingo
Date Posted: 07 Mar 11 at 5:28PM
Hi!

In your code snippet i don't see the pageselection.
So the loaded document is still on the first page.
Before FitImage you should use a
PDFLibrary.SelectPage(2);

Cheers, Ingo




Posted By: rweetch
Date Posted: 07 Mar 11 at 6:40PM
Many thanks, taht did the trick. Obvious now I look at it :-)



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