Print Page | Close Window

Re-render

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: General Discussion
Forum Description: Discussion board for Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=3137
Printed Date: 22 Nov 24 at 11:38PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Re-render
Posted By: mdgodfrey
Subject: Re-render
Date Posted: 19 Jun 15 at 5:37PM
I currently am working on a 2 page document.
First time I create it everything is as expected.

The problem starts when I want to re-render to update it.
My process is the same for each render:
Delete All Pages (1 to PageCount)
Select Page 1  (always exists according to the documentation)
Add Page elements
New Page
Select Page 2
Add Page Elements.

On the second time through page 2 is overwriting page 1, but it is also on page 2 as well.
I can't figure out what I am missing.

I have just discovered that if I do NewPage after deleting all pages then it works as expected, except that I end up with a page 3. So all is well if I then delete page 3.
Seems inconsistent to me.

What should I be doing?



Replies:
Posted By: erico
Date Posted: 19 Jun 15 at 8:38PM
PDF are picky about ContentStreams. We have encountered problems with pages overprinting each other as well, although under different circumstances. PDF allows you to create a content stream object and reuse it on more than one page. This can become problematic if you are not careful. You may need to be using ContentStreamSafe() and/or NewContentStream() to ensure the pages remain separate.


-------------
Eric O


Posted By: mdgodfrey
Date Posted: 19 Jun 15 at 10:21PM
I very much appreciate the response.
I will give that a try.



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