9951 explained code solutions for 126 technologies


php-tcpdfHow do I use the setxy function in PHP TCPDF?


The setXY() function in PHP TCPDF is used to set the current abscissa and ordinate positions. The function takes two parameters; the first is the abscissa position, and the second is the ordinate position. The positions are specified in user units (which is typically millimeters).

Example code

$pdf->setXY(10, 20);

Code explanation

  • $pdf - an instance of the TCPDF class
  • setXY() - the function that sets the current abscissa and ordinate positions
  • 10 - the abscissa position
  • 20 - the ordinate position

Helpful links

Edit this code on GitHub