Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

I've tried reading pdf::table documentation.

But there's not any mention to vertical alignment

My example code is:

#!/usr/bin/perl use strict; use PDF::API2; use PDF::Table; my $pdftable = new PDF::Table; my $pdf = new PDF::API2(-file => "pdf_table.pdf"); my $page = $pdf->page(); $pdf->mediabox('A4'); my $col_props = [ { justify => 'right', font => $pdf->corefont("Helvetica", -encoding => "utf8"), + font_size => 12, min_w => 100, max_w => 100, }, { justify => 'left', min_w => 100, max_w => 100, } ]; my $data = [ ['title0', "content 0" ], ['title1', "first line\nsecond line\nthird line"], ['title2', "content 2"], ['title3', "content 3"], ['title4', "content 4"], ['title5', "content 5"], ['title6', "content 6"] ] ; # build the table layout my ($end_page, $pages_spanned, $table_bot_y) = $pdftable->table( $pdf, $page, $data, x => 40, w => 200, start_y => 500, next_y => 700, start_h => 300, next_h => 500, padding => 5, padding_right => 10, column_props => $col_props, ); $pdf->saveas();

The cell of second row and second column takes three lines. Than I want to align vertically centered the content of all other columns of that row. I could'nt find any indication in the documentaion. Thank's</>

In reply to Re^2: Vertical align with PDF::Table by serioca
in thread Vertical align with PDF::Table by serioca

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (4)
    As of 2017-12-11 01:19 GMT
    Find Nodes?
      Voting Booth?
      What programming language do you hate the most?

      Results (285 votes). Check out past polls.