Search code examples
phppdfalignmentcellfpdf

pdf alignment top and bottom


I need Text alignment(Top and Bottom) in pdf file Creation.

I am using this line:

$pdf->Cell(0,0,"Submitted To:$subto",0,0,'alignment area');

alignment area: L,R,C

Solution

  • I found a plugin that seems to do what you need. Here you are: http://fpdf.de/downloads/addons/52/

    The plugin provides a function

    drawTextBox(string strText, float w, float h [, string align [, string valign [, int border]]])
    

    that allow to align text (both horizontal and vertical) within a rectangle defined by the function parameters.