I had trouble trouble adding the created textflow to the PDF. The create_textflow() method always returned 0 no matter how many textFlow I created until I added "textlen" to the optlist like this :
<?php
$length = strlen($infoJob['descriptionFac']);
$optlist = "fontname=Helvetica textlen=".$length." fontsize=".$fontSize." encoding=winansi";
?>
I don't know why, but apparently, in my case, textlen was a mandatory option...
PDF_create_textflow
(PECL pdflib:2.0-2.1.3)
PDF_create_textflow — Create textflow object
Description
int PDF_create_textflow
( resource $pdfdoc
, string $text
, string $optlist
)
Preprocesses text for later formatting and creates a textflow object.
PDF_create_textflow
Alexandre Lveill
12-Mar-2008 06:50
12-Mar-2008 06:50
