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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Table 8.1 Control characters and their meaning in Textflows<br />

Unicode character<br />

(VB equivalents)<br />

entity name<br />

equiv. Textflow<br />

option<br />

meaning within Textflows<br />

U+0020 SP, space space align words and break lines<br />

U+00A0 NBSP, nbsp (none) (no-break space) space character which will not break lines, and<br />

may change its width according to formatting options such as justification.<br />

U+202F<br />

NNBSP,<br />

nnbsp<br />

(none)<br />

(narrow no-break space) fixed-width space character which will<br />

not break lines, and will not change its width according to formatting<br />

options<br />

U+0009 (VbTab) HT, hortab (none) horizontal tab: will be processed according to the ruler,<br />

tabalignchar, and tabalignment options<br />

U+002D HY, hyphen (none) separator character for hyphenated words<br />

U+00AD SHY, shy (none) (soft hyphen) hyphenation opportunity, only visible at line breaks<br />

U+000B<br />

U+2028<br />

VT, verttab<br />

LS, linesep<br />

nextline<br />

(next line) forces a new line<br />

U+000A (VbLf)<br />

U+000D (VbCr)<br />

U+000D and<br />

U+000A (VbCrLf)<br />

U+0085<br />

U+2029<br />

LF, linefeed<br />

CR, return<br />

CRLF<br />

NEL, newline<br />

PS, parasep<br />

nextparagraph<br />

(next paragraph) Same effect as nextline; in addition, the<br />

parindent option will affect the next line.<br />

U+000C<br />

(VbFormFeed)<br />

FF, formfeed return fit_textflow( ) will stop, and return the string _nextpage.<br />

Mapping/removing characters or sequences of characters. The charmapping option<br />

can be used to map or remove some characters in the text to others. Let’s start with an<br />

easy case where we will map all tabs in the text to space characters. The charmapping option<br />

to achieve this looks as follows:<br />

charmapping={hortab space}<br />

This command uses the symbolic character names hortab and space. You can find a list<br />

of all known character names in the <strong>PDFlib</strong> API Reference. To achieve multiple mappings<br />

at once you can use the following command which will replace all tabs and line break<br />

combinations with space characters:<br />

charmapping={hortab space CRLF space LF space CR space}<br />

The following command removes all soft hyphens:<br />

charmapping={shy {shy 0}}<br />

Each tab character will be replaced with four space characters:<br />

charmapping={hortab {space 4}}<br />

Each arbitrary long sequence of linefeed characters will be reduced to a single linefeed<br />

character:<br />

216 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!