PHP Doku:: Erstellt eine neue PDF-Datei - function.pdf-begin-document.html

Verlauf / Chronik / History: (1) anzeigen

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

Ein Service von Reinhard Neidl - Webprogrammierung.

PDF Funktionen

<<PDF_attach_file

PDF_begin_font>>

PDF_begin_document

(PECL pdflib >= 2.0.0)

PDF_begin_documentErstellt eine neue PDF-Datei

Beschreibung

int PDF_begin_document ( resource $pdfdoc , string $filename , string $optlist )

Erstellt abhängig von verschiedenen Optionen eine neue PDF-Datei.


2 BenutzerBeiträge:
- Beiträge aktualisieren...
daniel at objective-view dot de
9.03.2008 13:03
Creating a PDF with a defined PDF-Version (1.6 in this case) works like this:

if (PDF_begin_document($p,  "", "compatibility 1.6") == 0) {
    die("Error: " . PDF_get_errmsg($p));
}
wheatin at gmail dot com
8.11.2007 15:43
There doesn't seem to be much documentation on setting options with this function, but here's the format for setting some basic things:

$optlist = "destination={page=1 type=fixed zoom=1 top=100 left=50}";
PDF_begin_document($pdfdoc, $filename, $optlist );

the '=' character can be replaced with a space, but I think '=' makes the code more readable.
Also, you must include 'type=fixed' to use 'zoom','left', or 'top'. You can set 'page' without it, though.
Hope this helps. And if anybody knows a good reference for the options that can be set here and what the format is, please link.



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",...)