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

Re: Vertical align with PDF::Table

by ww (Archbishop)
on Jan 26, 2013 at 01:19 UTC ( [id://1015438]=note: print w/replies, xml ) Need Help??


in reply to Vertical align with PDF::Table

I actually now regret being so diligent in approving this node.
  1. Set text size in table cell using PDF::Table (At this site)
  2. $ perldoc PDF::Table (On your computer)
  3. search.cpan.org/~rhythman/PDF-Table-0.02/lib/PDF/Table.pm (Using your browser)

Did you actually make any effort to answer this yourself?
    ... see How do I post a question effectively?

Replies are listed 'Best First'.
Re^2: Vertical align with PDF::Table
by serioca (Initiate) on Jan 28, 2013 at 11:54 UTC

    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</>

      "...there's not any mention to vertical alignment..."

      I'm too lazy to do your work (again) to double-check that assertion, but even if there's no specific use of the phrase "vertical alignment," there IS a specific example of "center" ... and in example-code, at that!

        ww, you are not too lazy to take time to diss serioca's very reasonable question. Your response does not address their question in the slightest: the "center" example refers to horizontal alignment, not vertical. Can we perhaps hit the Reset button, and return to the question?

        The situation is, as serioca has pointed out, that the documentation does not address vertical alignment. The question and the issue are clear. (I cannot help him further, with my level of knowledge about this (otherwise rather good) module.) I'd suggest any responses to this question should actually contribute something.

        Ed

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1015438]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2024-04-19 11:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found