17.05.2014 Views

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table 8.2 Options for controlling the line-breaking algorithm<br />

option<br />

locale<br />

maxspacing<br />

minspacing<br />

nofitlimit<br />

shrinklimit<br />

spreadlimit<br />

explanation<br />

(Keyword) The locale which will be used for localized linebreaking methods if advancedlinebreak=<br />

true. The keywords consists of one or more components, where the optional components are separated<br />

by an underscore character ’_’ (the syntax slightly differs from NLS/POSIX locale IDs):<br />

> A required two- or three-letter lowercase language code according to ISO 639-2 (see www.loc.gov/<br />

standards/iso639-2), e.g. en, (English), de (German), ja (Japanese). This differs from the language option.<br />

> An optional four-letter script code according to ISO 15924 (see www.unicode.org/iso15924/iso15924-<br />

codes.html), e.g. Hira (Hiragana), Hebr (Hebrew), Arab (Arabic), Thai (Thai).<br />

> An optional two-letter uppercase country code according to ISO 3166 (see www.iso.org/iso/country_<br />

codes/iso_3166_code_lists), e.g. DE (Germany), CH (Switzerland), GB (United Kingdom)<br />

The keyword _none specifies that no locale-specific processing will be done.<br />

Specifying a locale is required for advanced line breaking for some scripts, e.g. Thai. Default: _none<br />

Examples: Thai, de_DE, en_US, en_GB<br />

(Float or percentage) Specifies the maximum or minimum distance between words (in user coordinates,<br />

or as a percentage of the width of the space character). The calculated word spacing is limited by the provided<br />

values (but the wordspacing option will still be added). Defaults: minspacing=50%,<br />

maxspacing=500%<br />

(Float or percentage) Lower limit for the length of a line with the nofit method (in user coordinates or as<br />

a percentage of the width of the fitbox). Default: 75%.<br />

(Percentage) Lower limit for compressing text with the shrink method; the calculated shrinking factor is<br />

limited by the provided value, but will be multiplied with the value of the horizscaling option. Default:<br />

85%<br />

(Float or percentage) Upper limit for the distance between two characters for the spread method (in user<br />

coordinates or as a percentage of the font size); the calculated character distance will be added to the<br />

value of the charspacing option. Default: 0<br />

An inline option list generally does not create a line break opportunity in order to allow<br />

option changes within words. However, when an option list is surrounded by space<br />

characters there is a line break opportunity at the beginning of the option list. If a line<br />

break occurs at the option list and alignment=justify, the spaces preceding the option list<br />

will be discarded. The spaces after the option list will be retained, and will appear at the<br />

beginning of the next line.<br />

Preventing linebreaks. You can use the charclass option to prevent Textflow from<br />

breaking a line after specific characters. For example, the following option will prevent<br />

line breaks immediately after the / character:<br />

charclass={letter /}<br />

In order to prevent a sequence of text from being broken across lines you can bracket it<br />

with avoidbreak...noavoidbreak.<br />

Cookbook A full code sample can be found in the Cookbook topic text_output/avoid_linebreaking.<br />

220 Chapter 8: Text and Table Formatting (Edition for <strong>COM</strong>, .<strong>NET</strong>, and REALbasic)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!