kRulerChars top-level constant

int const kRulerChars

The paper content width (px) for the on-screen preview.

Conversion basis: CSS's 96dpi (1in = 96px = 25.4mm), minus 44px total for the left/right margins. A4 portrait comes out to exactly 750 —— the same as flutter.pas's original hardcoded PaperW constant, which confirms in reverse that that 750 was "A4 portrait minus margins", so this formula is compatible with the existing layout.

With this, WML no longer needs to "stretch" the layout with a long string, nor does each page need its own <table width=>: the width is determined by the paper size and orientation, and the screen updates automatically when orientation changes. Number of characters in the report's ruler line.

Reports use a numeric ruler line (

1234567890...

) to define the layout's baseline width -- that digit string has no spaces and can't wrap, so the whole report needs to be at least "this many characters" wide to fit. Currently set to 116 characters in WML. If the WML ruler line's length changes, this needs to change with it.

Implementation

const int kRulerChars = 116;