Difference between revisions of "FlowDocument"

From
Jump to: navigation, search
(Overview)
Line 1: Line 1:
 
== Overview==
 
== Overview==
A document model that can be composed using flow layout rules applied to various content elements or content containers and later saved as [[PDF]] document according to the given page size, PDF standard and other settings. It can be also saved as an XML template and loaded from it using XML-related routines implemented as instance methods.  
+
A document model that can be composed using flow layout rules applied to various content elements or content containers and later saved as [[PDF]] document according to the given page size, PDF standard and other settings. It can be also saved as an [[Flow layout API#XML templates|XML template]] and loaded from it using routines implemented as instance and static methods.  
  
[[FlowDocument]] supports styling for its elements and itself using [[Flow layout API#Style system|style]] objects which can be registered using its [[Flow layout API#Style and StyleManager relationship|StyleManager]] along with the matching expressions/selectors(document level styling). Alternatively, instance properties can be used for changing particular element's appearance (element level styling).
+
The [[FlowDocument]] supports styling for its elements and itself using [[Flow layout API#Style system|style]] objects which can be registered using its [[Flow layout API#Style and StyleManager relationship|StyleManager]] along with the matching expressions/selectors(document level styling). Alternatively, instance properties can be used for changing particular element's appearance (element level styling).
 +
 
 +
==Resource management==
 +
All necessary resources such as images, '''FixedContent''' objects, fonts should be registered in a special repository class '''ResourceManager''' in order to be used by any of the '''ContentElement''' objects composing flow document's content. One '''ResourceManager''' instance can serve multiple [[FlowDocument]] instances as it's independent from the flow document model and is used only when the document is being saved to PDF. It's primary role is to map resource ids assigned by the user to the actual data needed to generate PDF objects, this way one binary object such as image can be used many times within the PDF document by its reference(id) and stored only once reducing the final document's size.

Revision as of 17:17, 12 June 2018

Overview

A document model that can be composed using flow layout rules applied to various content elements or content containers and later saved as PDF document according to the given page size, PDF standard and other settings. It can be also saved as an XML template and loaded from it using routines implemented as instance and static methods.

The FlowDocument supports styling for its elements and itself using style objects which can be registered using its StyleManager along with the matching expressions/selectors(document level styling). Alternatively, instance properties can be used for changing particular element's appearance (element level styling).

Resource management

All necessary resources such as images, FixedContent objects, fonts should be registered in a special repository class ResourceManager in order to be used by any of the ContentElement objects composing flow document's content. One ResourceManager instance can serve multiple FlowDocument instances as it's independent from the flow document model and is used only when the document is being saved to PDF. It's primary role is to map resource ids assigned by the user to the actual data needed to generate PDF objects, this way one binary object such as image can be used many times within the PDF document by its reference(id) and stored only once reducing the final document's size.