10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

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.

cell border as the Material text. To avoid any space from the top we add the Textflow cellusing fittextflow={firstlinedist=capheight}. Then we add a margin of 4 points, the same asfor the text lines:/* option list for adding the Textflow cell */optlist = "textflow=" + tf + " fittextflow={firstlinedist=capheight} ""colwidth=120 margin=4";Cookbook A full code sample can be found in the Cookbook topic tables/vertical_text_alignment.7.4.2 Contents of a Table CellWhen adding a cell to a table with PDF_add_table_cell( ), you can specify various kinds ofcell contents. For example, the cells of the paper plane table contain the elements illustratedin Figure 7.36.Text lineText lineText lineText lineText lineTextflow ............................................................................................................................Text lineFig. 7.36Contents of thetable cellsSingle-line text. The text is supplied in the text parameter of PDF_add_table_cell( ). Inthe fittextline option all of the formatting options of PDF_fit_textline( ) can be specified.The default fit method is fitmethod=nofit. The cell will be enlarged if the text doesn’tcompletely fit into the cell. To avoid this, use fitmethod=auto to shrink the text subjectto the shrinklimit option. If no row height is given it will be calculated as the font sizetimes 1.5. The same applies to the row width for rotated text.Multi-line text with Textflow. The Textflow must have been prepared outside the tablefunctions and created with PDF_create_textflow( ) or PDF_add_textflow( ) before callingPDF_add_table_cell( ). The Textflow handle is supplied in the textflow option. In thefittextflow option all of the formatting options of PDF_fit_textflow( ) can be specified.The default fit method is fitmethod=clip. This means: First it is attempted to completelyfit the text into the cell. If the cell is not large enough its height will be increased.If the text do not fit anyway it will be clipped at the bottom. To avoid this, usefitmethod=auto to shrink the text subject to the minfontsize option.When the cell is too narrow the Textflow could be forced to split single words at undesiredpositions. If the checkwordsplitting option is true the cell width will be enlargeduntil no word splitting occurs any more.Images and templates. Images must be loaded with PDF_load_image( ) before callingPDF_add_table_cell( ). Templates must be created with PDF_begin_template( ). The imageor template handle is supplied in the image option. In the fitimage option all of the formattingoptions of PDF_fit_image( ) can be specified. The default fit method isfitmethod=meet. This means that the image/template will be placed completely insidethe cell without distorting its aspect ratio. The cell size will not be changed due to thesize of the image/template.168 Chapter 7: Formatting Features

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

Saved successfully!

Ooh no, something went wrong!