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.

hortabmethod ruler<br />

tabalignment left right right right<br />

ruler 30 150<br />

250<br />

350<br />

Fig. 8.17<br />

Placing text<br />

as a table<br />

ITEM DESCRIPTION QUANTITY PRICE AMOUNT<br />

1 Super Kite 2 20.00 40.00<br />

2 Turbo Flyer 5 40.00 200.00<br />

3 Giga Trash 1 180.00 180.00<br />

TOTAL 420.00<br />

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

Note <strong>PDFlib</strong>’s table feature is recommended for creating complex tables (see Section 8.3, »Table Formatting«,<br />

page 227).<br />

8.2.5 Numbered Lists and Paragraph Spacing<br />

The following example demonstrates how to format a numbered list using the inline<br />

option leftindent (see Figure 8.18):<br />

1.Long Distance Glider: With this paper rocket you can send all<br />

your messages even when sitting in a hall or in the cinema pretty near the back.<br />

2.Giant Wing: An unbelievable sailplane! It is amazingly<br />

robust and can even do aerobatics. But it is best suited to gliding.<br />

3.Cone Head Rocket: This paper arrow can be thrown with big<br />

swing. We launched it from the roof of a hotel. It stayed in the air a long time and<br />

covered a considerable distance.<br />

Cookbook Full code samples for bulleted and numbered lists can be found in the Cookbook topics<br />

text_output/bulleted_list and text_output/numbered_list.<br />

Setting and resetting the indentation value is cumbersome, especially since it is required<br />

for each paragraph. A more elegant solution defines a macro called list. For convenience<br />

it defines a macro indent which is used as a constant. The macro definitions are<br />

as follows:<br />

<br />

1. Long Distance Glider: With this paper rocket you can send all your messages<br />

even when sitting in a hall or in the cinema pretty near the back.<br />

2. Giant Wing: An unbelievable sailplane! It is amazingly robust and can even do<br />

aerobatics. But it is best suited to gliding.<br />

1. Long Distance Glider: With this paper rocket you can send all your<br />

messages even when sitting in a hall or in the cinema pretty near the<br />

back.<br />

2. Giant Wing: An unbelievable sailplane! It is amazingly robust and can<br />

even do aerobatics. But it is best suited to gliding.<br />

3. Cone Head Rocket: This paper arrow can be thrown with big swing. We<br />

launched it from the roof of a hotel. It stayed in the air a long time and<br />

covered a considerable distance.<br />

Fig. 8.18<br />

Numbered list<br />

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