Standard document components¶
The scryber library comes with all the standard components used in document creation, similar to HTML
Document level visual components¶
- Page
- A single page, where content that will extend beyond the boundaries is truncated
- Has an optional page header and page footer, as well as content.
- see Scryber.Components.PDFPage
- Section
- A set of pages of the same size and orientation, where content that flow onto the next page.
- Has an optional continuation page header and footer, along with the page header, page footer and content.
- see Scryber.Components.PDFSection
- Page-Group
- A group of pages that can have shared size, header and footer content, and style.
- Individual pages can override as needed.
- see Scryber.Components.PDFPageGroup
- Page-Ref
- A reference to one of the above components in a separate file.
- Specified via a required source attribute.
- see Splitting into multiple files and Scryber.Components.PDFPage
Standard structural components¶
- Div
- a block level component that will fill the width of the available parent.
- see Scryber.Components.PDFDiv
- Span
- an inline compnent that can have any content including text.
- see Scryber.Components.PDFSpan
- Table
- A grid of rows and cells (that can be spanned across columns.
- see Scryber.Components.PDFTable
- Lists
- Ordered lists with numbering styles.
- Unodered lists with a bullet styles.
- Definition lists with a label and content.
- see Scryber.Components.PDFList
- Paragraph
- A textual (and other content), that has a more defined style than a div.
- see Scryber.Components.PDFPara
- Heading (1 to 6)
- A textual (and other content), that is given a pre-defined style based on it’s level of 1 to 6
- H1, H2, H3, H4, H5, H6
- see Scryber.Components.PDFHead1 - PDFHead6
- Layer-Group
- A wrapper for a set of Layers.
- Each layer will be relatively positioned (default to 0,0) ontop ove each other.
- Layers can be shown and hidden as needed.
- see Scryber.Components.PDFLayerGroup
- Canvas
- A drawing panel that will by default relatively position all child components
- see Scryber.Components.PDFCanvas
- Block Quote
- A panel with specific margins.
- see Scryber.Components.PDFBlockQuote
- Preformatted
- A container for pre-formatted text, that will not flow over new lines, or remove line breaks (by detault).
- see Scryber.Components.PDFPreformatted
- Component-Ref
- A reference to an external file or stream that will be injected into the page at runtime.
- see Splitting into multiple files
- Column break
- Stops the flow of content within the current region, and moves any following content onto the next available column.
- Can be positioned at any depth within a multicolumn layout.
- see document_layout and Scryber.Drawing.PDFColumnBreak
- Page break
- Stops the flow of content within the current page, and moves any following content onto the next available page.
- Can be positioned at any depth within a layout.
- see document_layout and Scryber.Drawing.PDFPageBreak
Textual components¶
- Text
- A text literal compenent where the text can be set to the @value attribute.
- Supports full data binding.
- see Scryber.Components.PDFText
- Number
- A litteral component that supports numeric values (@value attribute as well as number formatting (@styles:number-format)
- Can display numbers in any of the standard floating point, currency and integral types.
- see Scryber.Components.PDFNumber
- Date
- A litteral component that supports date time values (@value attribute as well as date formatting (@styles:date-format)
- Can display dates in any of the standard localized formats.
- see Scryber.Components.PDFDate
- Label
- A text literal component where the text can be set to the @text attribute.
- Supports full data binding.
- The only difference is a more formal distinction of purpose than text.
- see Scryber.Components.PDFLabel
- PageNumber
- A textual component that displays the current output page number where the component is placed.
- Supports the use of page section counting and total document page count.
- see Scryber.Drawing.PDFPageNumber
- PageOf
- A textual compenent that displays the page number of a referenced component.
- Supports the use of page section counting and total document page count.
- see Scryber.Drawing.PDFPageOf
- Link
- A hyper link to a location within the current document, or another document, or a web resource.
- Content within can be styled appropriately.
- Document references can be based on ID or name.
- Page links can be First, Previous, Next, Last or numbered.
- see Links within documents - td and Scryber.Drawing.PDFLink
Graphical components¶
- Images
- A static or dynamic image loaded from a source, and inserting into the output document.
- Supports the use of full, relative or dynamic url references.
- Supports png, jpeg and tiff file formats.
- Supports alpha channels where available in the source.
- see Images in documents - td and Scryber.Components.PDFImage
- Horizontal Rule
- A single line within the flow of the document.
- Can be styled as a independant component.
- see Scryber.Components.PDFHorizontalRule
- Line, Rect, Polygon, Ellipse, Path
- Standard drawing components that can be used either within the flow of the content or for drawing/designs.
- see Drawing paths and shapes - td
- and for individual components Scryber.Components.PDFLine, Scryber.Components.PDFRect, Scryber.Components.PDFEllipse, Scryber.Components.PDFPolygon, Scryber.Components.PDFPath
Data visual components¶
For a general use of the data components see Passing data to your template and Data Binding in Scryber - td. And for an overview of the data sources available see Available Data Sources in Scryber - td
- ForEach
- Loops through each value in a data source, with an optional step, offset and count.
- Outputs the content within the tempate, that can be any inner content.
- see Scryber.Data.PDFForEach
- DataGrid
- Loops through each value in a data source.
- Outputs the content as a table of results, with various column types.
- Allows for auto population from a schema in a data source.
- Also supports alternating styles, fotters and headers.
- see Scryber.Data.PDFDataGrid
- DataList
- Loops through each value in a data source, with an optional step, offset and count.
- Outputs the content as panels, lists, or spans.
- Allows for auto population from a schema in a data source.
- Also supports output order, flow direction, and alternating styles.
- see Scryber.Components.PDFDataList
- With
- Takes a data value or source and applies it to the current context so it can be used in binding statements.
- Can have any content, and they are full components, rather than templates.
- Supports both xml and object values.
- see Scryber.Data.PDFWith
- WithFieldSet
- Takes a data value or source and applies it to the current context so it can be used in binding statements.
- Supports the use of fields within the block to automatically create the content.
- Allows for auto population from a schema in a data source.
- Supports both xml and object values.
- see Scryber.Data.PDFWithFieldSet
- Choose
- Optionally displays a set of content based on a decision (test).
- Allows multiple reference/data_ChooseWhen to be defined within the component.
- The first true decision will be output, and all others not rendered in the document.
- Allows the use of one reference/data_ChooseOtherwise component as a catch all.
- see Scryber.Data.PDFChoose
- If
- Optionally displays a set of content based on a decision (test).
- If the decision is false, then no inner content will be rendered.
- see Scryber.Data.PDFIf
Html components¶
- Html Page
- A full section that supports the inclusion for html (or markdown) content output within a document as it’s own page(s).
- Supports the use of inline style conversion (with limitations) to scryber styles.
- Content can either be loaded dynamically by the component, assigned from a data source, or explicitly set from code.
- see using_html for more information on Html in scryber.
- see Scryber.PDF.PDFHtml
- Html Fragment.
- A block of html that can sit within a document.
- Supports the use of inline style conversion (with limitations) to scryber styles.
- Content can either be loaded dynamically by the component, assigned from a data source, or explicitly set from code.
- see using_html for more information on Html in scryber.
- see Scryber.PDF.PDFHtmlFragmet