PHP Doku:: Erzeugt Textflussobjekt - function.pdf-create-textflow.html

Verlauf / Chronik / History: (41) anzeigen

Sie sind hier:
Doku-StartseitePHP-HandbuchFunktionsreferenzNon-Text MIME-AusgabenPDFPDF FunktionenPDF_create_textflow

Ein Service von Reinhard Neidl - Webprogrammierung.

PDF Funktionen

<<PDF_create_pvf

PDF_curveto>>

PDF_create_textflow

(PECL pdflib >= 2.0.0)

PDF_create_textflowErzeugt Textflussobjekt

Beschreibung

int PDF_create_textflow ( resource $pdfdoc , string $text , string $optlist )

Bereitet den Text zur späteren Formatierung vor und erzeugt ein Textflussobjekt.


2 BenutzerBeiträge:
- Beiträge aktualisieren...
Hangumk
13.08.2008 15:50
Not much documentation except the latest Pdflib manual, but either way the textlen is not required.

I have this and it works for me:

$opts = "fontname={$this->font[0]->_name} fontsize=$font_size encoding=$font_encoding alignment=$align ";
if ($indent) {
   $opts .= "leftindent=$indent ";
}
$textflow = pdf_create_textflow($this->_pdf,$data,$opts);

I've been working with the pdflib v7 for 2 months now, and since there's virtually no documentation on anythign except their manual, I recommend reading it. It's pretty good and detailed.
Alexandre Lveill
12.03.2008 18:50
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...



PHP Powered Diese Seite bei php.net
The PHP manual text and comments are covered by the Creative Commons Attribution 3.0 License © the PHP Documentation Group - Impressum - mail("TO:Reinhard Neidl",...)