10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

image = p.load_image("auto", "kraxi_logo.tif", "");if (image == -1)throw new Exception("Error: " + p.get_errmsg());optlist = "fittextline={font=" + boldfont + " fontsize=9} image=" + image +" colwidth=" + c3 + " rowspan=3 margin=4";tbl = p.add_table_cell(tbl, 3, 2, "Amazingly robust!", optlist);if (tbl == -1)throw new Exception("Error: " + p.get_errmsg());Alternatively, you could import the image as a PDF page. Make sure that the PDI page isclosed only after the call to PDF_fit_table( ).int doc = p.open_pdi("kraxi_logo.pdf", "", 0);if (tbl == -1)throw new Exception("Error: " + p.get_errmsg());page = p.open_pdi_page(doc, pageno, "");if (tbl == -1)throw new Exception("Error: " + p.get_errmsg());optlist = "fittextline={font=" + boldfont + " fontsize=9} pdipage=" + page +" colwidth=" + c3 + " rowspan=3 margin=4";tbl = p.add_table_cell(tbl, 3, 2, "Amazingly robust!", optlist);if (tbl == -1)throw new Exception("Error: " + p.get_errmsg());Step 6: Fit the table. In the last step we place the table with PDF_fit_table( ). Usingheader=1 the table header will include the first line. The fill option and the suboptionsarea=header and fillcolor={rgb 0.8 0.8 0.87} specify the header row(s) to be filled with thesupplied color. Using the stroke option and the suboptions line=frame linewidth=0.8 wedefine a ruling of the table frame with a line width of 0.8. Using line=other linewidth=0.3a ruling of all cells is specified with a line width of 0.3.optlist = "header=1 fill={{area=header fillcolor={rgb 0.8 0.8 0.87}}} " +"stroke={{line=frame linewidth=0.8} {line=other linewidth=0.3}}";result = p.fit_table(tbl, llx, lly, urx, ury, optlist);if (result.equals("_error"))throw new Exception("Error: " + p.get_errmsg());p.end_page_ext("");7.4.5 Table InstancesThe rows of the table which are placed in one fitbox comprise a table instance. One ormore table instances may be required to represent the full table. Each call to PDF_fit_table( ) will place one table instance in one fitbox. The fitboxes can be placed on thesame page, e.g. with a multi-column layout, or on several pages.7.4 Table Formatting 173

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

Saved successfully!

Ooh no, something went wrong!