pdfclown - Create two or three columns spreadsheet having multiple rows? -
i understand table , cells supported in pdfclown version 2.0 few months away. so, being stuck version 1.2, how create spreadsheet having 2 columns (& spreadsheet having 3 columns)?
anything examples point me in right direction.
as noticed, the layout engine supporting tables , lots of other high-level typographic elements scheduled 0.2.0 (its java implementation pre-released evaluation , beta-testing); in meantime can coarsely arrange table way:
- define table partition (columns) on page , draw corresponding rectangles through primitivecomposer;
- insert in each column area contents through blockcomposer, keeping track of maximum y occupied contents (this calculated when call blockcomposer.end(), after can retrieve bounding box of contents via blockcomposer.boundbox);
- when complete columns current table row, use maximum y saved in step 2 draw bottom line closes row , iterate step 2 until run out of rows;
- if run out of space while inserting contents, keep track of positions returned blockcomposer.showtext() , blockcomposer.showxobject(): way can fill each column, move next page , resume insertion according tracked positions.
this should suffice job done. ;-)
Comments
Post a Comment