in reply to Re: PDF::API2 paragraph vertical align
in thread PDF::API2 paragraph vertical align
Instead of dummy text, I wrote the original text in white color. The background is white. So the white text is not viewable in the pdf. Is it a bad idea?? Is there any other way instead of putting the original text?
$y is re-calculated with respect to $height_remaining.$text->fillcolor('#ffffff'); $text->translate($x, $y); ($overflow_text, $height_remaining) = $text->paragraph(qq{text here}, +$width, $height);
$y -= $height_remaining / 2;
Now I wrote the text again in black font. So now the text is vertically aligned in the given height.
Thanks again!!!$text->fillcolor('#000000'); $text->translate($x, $y); $text->paragraph(qq{text here}, $width, $height);
|
|---|