Print Page | Close Window

CapturePage then use on NewDocument

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=2099
Printed Date: 06 Feb 26 at 7:47AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: CapturePage then use on NewDocument
Posted By: NBachus
Subject: CapturePage then use on NewDocument
Date Posted: 11 Jan 12 at 7:26PM
I am trying to capture a page from one document, and DrawCapturedPage into a different document ID.  Is this possible?  I am currently getting the "invalid capture id" error when doing so.  Here is an example code:

doc1 = QP.SelectedDocument()
doc2 = QP.NewDocument()

ret = QP.SelectDocument(doc1)
currentPageID = QP.CapturePage(1)


ret = QP.SelectDocument(doc2)
ret = QP.SelectPage(1)
ret = QP.DrawCapturedPage(currentPageID, 500, 500, 500, 500)





Replies:
Posted By: Ingo
Date Posted: 12 Jan 12 at 7:29AM
Hi!
 
Here's a sample from the forum here:
http://www.quickpdf.org/forum/page-conversion_topic1937_post8242.html?KW=QP%2EDrawCapturedPage#8242 - http://www.quickpdf.org/forum/page-conversion_topic1937_post8242.html?KW=QP%2EDrawCapturedPage#8242
Please check it out.
 
Cheers and welcome here,
Ingo
 


Posted By: AndrewC
Date Posted: 12 Jan 12 at 10:55AM
When you use CapturePage and DrawCapturePage you must use the same documentID.  What you normally is call MergeDocument() to merge the page that you want to capture into the document that you want to draw on.  Capture that page, which deletes it, and then DrawCapturePage to draw it where you need to.

Andrew.



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