Jump to content

Kicking myself - PDF class...


Sam Granger

Recommended Posts

I am trying to get the following pdf class to work: http://www.ros.co.nz/pdf/

 

I can get text in the PDF, but if I have a long sentence, it just cuts off when the line ends (it does not continue on the following line). I am hoping that someone here has experience using this class and tell me what I am doing wrong/what I am missing.

 

$pdf = new Cpdf();
$pdf->selectFont('/fonts/Times-Roman.afm');
$pdf->addText(10,770,15,$title);
$pdf->addText(10,740,10,'VEry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text vry lannngge text');
$pdf->addText(10,30,10,'Site Name');
$pdf->stream();

Link to comment
https://forums.phpfreaks.com/topic/74888-kicking-myself-pdf-class/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.