Question & Answer
Where and how can I define or change page setup options within Document Connect?
Document Connect allows to define and use both standarized and individually set paper formats. As part of the product, Document Connect provides two examples: A4 and US Letter. You can use these as-is, modify them to fit your needs, or copy and modify them for other paper sizes and formats.
- The A4 Paper Format Definition is contained in the page format element .cdPaperFormat.A4
- The US Letter Paper Format Definition is contained in the page format element .cdPaperFormat.Letter
These elements, which define the page geometry (see below), are used in the element .cdDocLayoutDefault in the fields $CDPageStart1 (for the first page) and $CDPageStart2 (for page 2 and subsequent).
Note: The default which is used in the fields $CDPageStart1 und CD$PageStart2 is .cdPaperFormat.A4, so you must change this default value if you want to use US Letter Format.
Settings in .cdPaperFormat and .cdPaperFormatLetter
The page settings fields (page geometry) within .cdPaperFormat.A4 and .cdPaperFormat.Letter are illustrated by the following drawing:
- CD$PaperHeight and CD$PaperWidth represent the height and the width of the paper.
- CD$TopMargin defines the length of the top margin, which is also the start of the Header. It is measured from the top of the paper, which starts at 0.
- CD$HeaderLength defines the length of the Header. Therefore CD$TopMargin + CD$HeaderLength defines the position of the start of the body text.
- CD$BodyTextLength defines the length of the body text.
- CD$BottomMargin defines the position of the bottom line of printable output on the page. It is measured from the top of the paper, i.e. it is measured from 0.
- CD$FooterLength defines the length of the Footer. Therefore, CD$BottomMargin minus CD$FooterLength defines the position of the start of the footer (measured from the top of the page).
- CD$LeftMargin defines the position of the left margin. In particular it is used for left alignment of (printed) text. It is measured from the left paper edge, which starts at 0.
- CD$RightMargin defines the position of the right margin. In particular it is used for right alignment and for line splits / new lines. It is measured from the left edge of the paper, which starts at 0.
All these fields are defined within the .cdPaperFormat.A4 and .cdPaperFormat.Letter elements. The measurement unit is metric (mm). (Note: 1 inch = 25.4 mm)
CD$PaperHeight and CDPaper$Width are defined in the A4 and US Paper Format elements and should not be changed. It is up to the administrator to change all other values according to their requirements. Note that if the original paper format elements are changed, the original default values are not saved. These original values can be looked up in the Document Connect Adminstration and User Guide.
The following rules and considerations should be observed:
- All values must be positive numbers
- 0 < CD$LeftMargin < CD$RightMargin < CD$PaperWidth
- 0 < CD$BottomMargin < CD$PaperHeight
- CD$BottomMargin - CD$FooterLength < CD$TopMargin + CD$HeaderLength + CD$BodyTextLength
- The values you choose for CD$HeaderLength and CD$FooterLength should be based on the content of the Header and Footer Elements, which are referenced in .cdHeader or .cdFooter. The Default References are .cdHeader1 and .cdFooter1.
- The value you choose for CD$BodyTextLength should be based on the content of the used template. This is often the case if the the template contains a table which has a certain static or dynamically changing table length. In both cases precautions must be taken (e.g. Limitation of numbers of table rows or length of field content in rows) to ensure that the length of the table does not exceed CD$BodyTextLength.
Making your own format
You can define your own paper format by proceeding as follows:
- Open Lotus Domino Designer.
- Copy the form .cdPaperFormat.A4 (or .cdPaperFormat.Letter) to a new form, say .cdPaperFormat.xyz (Be certain that the first character starts with a dot !).
- Open .cdPaperFormat.xyz and change the values to your requirements (respecting the rules and considerations from above) and save .cdPaperFormat.xyz.
- Open .cdDocLayoutDefault (or the document layout element you are using) and change the second parameter of the default value of the fields CD$PageStart1 and CD$PageStart2 to .cdPaperFormat.xyz (Example: After the change, the default values should look like this: "1;.cdPaperFormat.xyz;.cdHeader;.cdFooter;-1;Portrait;Simplex;All;1" (for CD$PageStart1) and "2;.cdPaperFormat.xyz;.cdHeader;.cdFooter;-1;Portrait;Simplex;All" (for CD$PageStart2 )).
- Save .cdDocLayoutDefault (or the document layout element you are using)
- Close Lotus Domino Designer.
- Open Document Connect for Lotus Notes and do a rebuild database index.
- Test your own format with your documents.
15 June 2018