Jump to: navigation, search

Report API

83 bytes added, 13:11, 24 September 2007
no edit summary
At the moment the combination of textual and graphical elements within one document is not supported (for future plans refer to [[Report API redesign]]), thus Text and Graphical reports are implemented via separate APIs, though they have a common part.
This common part is implemented in the [ BaseDoc class], which contains among others basic document opening, closing, and stylesheet handling methods. It also stores the physical description of a page (sheet of paper in print).
<blockquote>'''Note!''' The <tt></tt> and the <tt>BaseDoc.close</tt> methods have to be implemented by the subclassed document generators.</blockquote>
Description of the paper, which every report will be rendered on, is stored by an instance of the [ PaperStyle class]. This instance is available via the <tt>BaseDoc.paper_style</tt> class attribute. The chosen PaperStyle is given to the document generator at initialization, and is handled by the reporting framework.
Text reports do not need to care about paper properties, as the document generator (or the external viewer) paginates the report according to those properties. While, on the other hand, graphical reports do need to take paper properties into account when creating graphical elements. [[Image:gramps-devel.png|left|22px]] '''SPACE FOR IMPROVEMENTS'document generator should hide paper properies for graphical reports too''<br/>
==Text document API==
==Graphical document API==

Navigation menu