Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Windows 7 Forum Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

How to dynamically generate XPS pages / subclass DocumentPaginator

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 10-17-2006   #1 (permalink)
Jens
Guest


 

How to dynamically generate XPS pages / subclass DocumentPaginator

Hi all,

I would like to use DocumentViewer Control to display XPS like documents. As
my documents may contain several thousands of pages it is not feasible to
generate them all in advance. I need a way to create pages on the fly when
they appear in the control.

For retrieving pages from the document there exists the DocumentPaginator
class. For my purposes I would need my own implementation of this class that
overrides the GetPage() and GetPageAsync() methods and implement it in a way
that a requested page is generated on the fly. This class is abstract so
custom implementations should be possible.

But my problem is: How can I make my FixedDocument aware of my derived
DocumentPaginator? FixedDocument has the DocumentPaginator property but no
setter method.

My workaround was to derive my own class from FixedDocument containing my
paginator and to override the getter of the DocumentPaginator property. But
this does not work. The control just remains empty (strange enough I would
not FixedDocument at all, just the paginator would be sufficient, but then
DocumentViewer control complains that it only supports FixedDocument and
FlowDocument types...)

Dynamic generation of pages should not be such an exotic requirement. Did I
miss something?

Thanks for any help

Jens


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically Drawing Objects kmttern Avalon 0 03-25-2008 09:51 AM
dynamically create variable? Pete Gomersall PowerShell 1 12-22-2007 03:03 PM
Dynamically populate unattend.xml Ca$h C0w Vista installation & setup 0 05-09-2007 01:50 PM
Creating a hashtable dynamically Marco Shaw PowerShell 1 02-21-2007 07:20 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51