Skip to content

Tag Definition: docinit

Generated by rlextra version 4.3.0a1

Attributes

Name

Required?

Default_Value

Values

pageLayout

implied

None

['SinglePage', 'OneColumn', 'TwoColumnLeft', 'TwoColumnRight']

pageMode

implied

None

['UseNone', 'UseOutlines', 'UseThumbs', 'FullScreen']

useCropMarks

implied

None

['yes', 'no', '0', '1', 'true', 'false']

Can contain
(alias | color | name | namedString | outlineAdd | registerType1Face | registerFont | registerCidFont | registerTTFont | registerFontFamily | logConfig | cropMarks | startIndex | canvasConfig)*

Purpose

This is where we register the fonts and colors to be used throughout the document.

Check out our docs page on this.

Example usage

<docinit>
    <registerTTFont faceName="standard" fileName="fonts/ArialMT-Regular.ttf"/>
    <color id="my-color" CMYK=".88,.6,0,.1"/>
</docinit>
...
<stylesheet>
    <paraStyle name="text" fontName="standard" fontSize="10" textColor="my-color"/>
</stylesheet>
<story>
    <para style="text">This text will generate using the font I defined</para>
</story>

Note: Only relevant sections are used in this snippet. Some tags were not included. See some of our samples for further insight of how you may go about setting up a full document using rml.

Example of nesting path from the parent tags to the current tag

<document> ➔ <docinit>