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.

* 1 create header */<br />

p.set_text_pos(x_header, y_header);<br />

...<br />

p.end_item(id_header);<br />

id_art = p.begin_item("Art", "Title=Article");<br />

id_sect1 = p.begin_item("Sect", "Title = {First Section}");<br />

/* 2 create top part of left column */<br />

p.set_text_pos(x1_left, y1_left_top);<br />

...<br />

String optlist = "Title=Table parent=" + id_art;<br />

id_table = p.begin_item("Table", optlist);<br />

/* 3 create table structure and content */<br />

p.set_text_pos(x_start_table, y_start_table);<br />

...<br />

p.end_item(id_table);<br />

/* continue with first section */<br />

p.activate_item(id_sect1);<br />

/* 4 create bottom part of left column */<br />

p.set_text_pos(x1_left, y1_left_bottom);<br />

...<br />

optlist = "Title=Insert parent=" + id_art;<br />

id_insert = p.begin_item("P", optlist);<br />

/* 5 create insert structure and content */<br />

p.set_text_pos(x_start_table, y_start_table);<br />

...<br />

p.end_item(id_insert);<br />

/* still more contents for the first section */<br />

p.activate_item(id_sect1);<br />

/* 6 create top part of right column */<br />

p.set_text_pos(x1_right, y1_right_top);<br />

...<br />

p.end_item(id_sect1);<br />

id_sect2 = p.begin_item("Sect", "Title={Second Section}");<br />

/* 7 create bottom part of right column */<br />

p.set_text_pos(x2_right, y2_right);<br />

...<br />

/* second section may be continued on next page(s) */<br />

p.end_item(id_sect2);<br />

id_footer = p.begin_item("Artifact", "");<br />

/* 8 create footer */<br />

p.set_text_pos(x_footer, y_footer);<br />

...<br />

p.end_item(id_footer);<br />

/* article may be continued on next page(s) */<br />

...<br />

p.end_item(id_art);<br />

10.5 Tagged PDF 273

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

Saved successfully!

Ooh no, something went wrong!