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.

Fig. 8.24 Options for justified text in a narrow fitbox<br />

Generated output Option list for fit_textflow( )<br />

passing the time.We<br />

offer revolutionary<br />

brand new developments<br />

a) of the traditional<br />

alignment=justify shrinklimit=50%<br />

common paper planes.<br />

If your lesson, conference,<br />

or lecture turn out to<br />

Our paper planes<br />

are the ideal way of<br />

b) passing the time.We<br />

offer revolutionary<br />

alignment=justify spreadlimit=5<br />

b r a n d n e w<br />

developments of the<br />

ments of the traditional<br />

common paper planes.<br />

c)<br />

If your lesson,<br />

conference, or lecture<br />

alignment=justify nofitlimit=50<br />

turn out to be deadly<br />

boring, you can have<br />

Option spreadlimit for justified text. Expanding text, which is achieved by the spread<br />

method and controlled by the spreadlimit option, is another method for controlling line<br />

breaks. This unpleasing method should be rarely used, however. Figure 8.24b demonstrates<br />

a very large maximum character distance of 5 units using spreadlimit=5.<br />

Option nofitlimit for justified text. The nofitlimit option controls how small a line can<br />

get when the nofit method is applied. Reducing the default value of 75% is preferable to<br />

forced hyphenation when the fitbox is very narrow. Figure 8.24c shows the generated<br />

text output with a minimum text width of 50%.<br />

8.2.9 Advanced script-specific Line Breaking<br />

<strong>PDFlib</strong> implements an additional line breaking algorithm on top of the standard line<br />

breaking algorithm. This advanced line breaking algorithm is required for some scripts,<br />

and improves line breaking behavior for some other script/locale combinations even if<br />

it is not required. It can be enabled with the advancedlinebreak option. Since line breaking<br />

depends on the language of the text, the advanced line breaking algorithm honors<br />

the script option (see Table 6.2) and the locale option (see <strong>PDFlib</strong> API Reference). Advanced<br />

line breaking determines proper line break opportunities in the following situations:<br />

> For scripts in which line breaking does not rely on the presence of space characters in<br />

the text, e.g. Thai. The following Textflow option list enables advanced line breaking<br />

for Thai:<br />

<br />

> In script/locale combinations which require specific treatment of certain punctuation<br />

characters, e.g. the « and » guillemet characters used as quotation marks in<br />

French text. The following Textflow option list enables advanced line breaking for<br />

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