Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Und dann kann man das als PDF runterladen...
Search
Andreas Heigl
February 24, 2014
Technology
0
41
Und dann kann man das als PDF runterladen...
The state of PDF-creation libraries in PHP (date 2014)...
Andreas Heigl
February 24, 2014
Tweet
Share
More Decks by Andreas Heigl
See All by Andreas Heigl
Gitlab - an introduction
heiglandreas
0
42
Schei� encoding
heiglandreas
0
71
Aus alt mach neu
heiglandreas
0
25
Other Decks in Technology
See All in Technology
202512_AIoT.pdf
iotcomjpadmin
0
180
Agentic AIが変革するAWSの開発・運用・セキュリティ ~Frontier Agentsを試してみた~ / Agentic AI transforms AWS development, operations, and security I tried Frontier Agents
yuj1osm
0
210
研究開発部メンバーの働き⽅ / Sansan R&D Profile
sansan33
PRO
4
21k
AWS re:Invent 2025 を振り返る
kazzpapa3
2
110
Everything As Code
yosuke_ai
0
500
I tried making a solo advent calendar!
zzzzico
0
140
テストセンター受験、オンライン受験、どっちなんだい?
yama3133
0
200
「違う現場で格闘する二人」——社内コミュニティがつないだトヨタ流アジャイルの実践とその先
shinichitakeuchi
0
150
歴史から学ぶ、Goのメモリ管理基礎
logica0419
10
2.3k
モノタロウ x クリエーションラインで実現する チームトポロジーにおける プラットフォームチーム・ ストリームアラインドチームの 効果的なコラボレーション
creationline
0
530
ソフトウェアエンジニアとAIエンジニアの役割分担についてのある事例
kworkdev
PRO
1
380
re:Invent2025 セッションレポ ~Spec-driven development with Kiro~
nrinetcom
PRO
2
170
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
A Tale of Four Properties
chriscoyier
162
23k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
140
Are puppies a ranking factor?
jonoalderson
0
2.6k
Designing Powerful Visuals for Engaging Learning
tmiket
0
200
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.5k
Optimizing for Happiness
mojombo
379
70k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
47
My Coaching Mixtape
mlcsv
0
21
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
140
Docker and Python
trallard
47
3.7k
Transcript
... und das kann man dann als PDF runterladen
$ who am i Andreas Heigl PHP & PDF seit
~15 Jahren @heiglandreas
[email protected]
... und das kann man dann als PDF runterladen Was
ist PDF Was ist PDF nicht? Warum PDF? Auswahl von Bibliotheken Vergleich Code-Beispiele
Was ist PDF
Was ist PDF Seitenbeschreibungs-Definition PDF - 82 qm / 6,5kg
Papier (1310 Seiten) HTML - 24qm / 2kg Papier (389 Seiten)
Was ist PDF Austauschformat Containerformat WYSIWYG
Was ist PDF nicht
Was ist PDF nicht Unveränderlich Immer gleich Sicher
Warum PDF?
Warum? Ausdrucken Mitnehmen Aufbewahren Unveränderlich
Warum: Ausdrucken @print{} Highend-Druckdaten
Warum:Mitnehmen @print{} Speichern als PDF Speichern als Webseite mit Bildern
Warum:Aufbewahren Ah! PDF-Dateien PDF-Dateien mit Archiv-Informationen
Warum: Unveränderlich Vergesst es! Jedes PDF lässt sich bearbeiten und
verändern! Signierte PDF-Dateien
PDF und PHP
Bibliotheken Konvertierender Ansatz Programatischer Ansatz
Bibliotheken Konvertierend DOMPDF HTML2PDF pdflatex PHPpdf Document-Komponente der zetaComponents
DOMPDF Nutzt intern PDFlib oder R&OS/CPDF Nutzung: dompdf http://example.org
HTML2PDF Nutzt intern TCPDF Letzte Aktualisierung 2011 Nutzung: html2pdf http://example.org
pdflatex Nutzt intern LaTeX LaTeX-Dokument muss programmatisch erstellt werden Nutzung:
pdflatex meinHtmlDocument.tex Wandelt dann in meinHtmlDocument.pdf
PHPpdf Konvertiert XML > PDF Basiert auf Zend_Pdf
ZetaComponents Verarbeitet diverse Eingangsformate (XHTML, ReST, DocBook, odt, Confluence, Mediawiki)
Nutzt intern TCPDF oder Haru Eigene Konverter möglich
// Convert some input RSTfile to docbook $document = new
ezcDocumentRst(); $document-‐>loadFile( './article/introduction.txt' ); // Load the docbook document and create a PDF from it $pdf = new ezcDocumentPdf(); $pdf-‐>options-‐>errorReporting = E_PARSE | E_ERROR | E_WARNING; // Load a custom style sheet $pdf-‐>loadStyles( 'custom.css' ); // Add a customized footer $pdf-‐>registerPdfPart( new ezcDocumentPdfFooterPdfPart( new ezcDocumentPdfFooterOptions( array( 'showDocumentTitle' => false, 'showDocumentAuthor' => false, 'height' => '10mm', ) ) ) ); // Add a customized header $pdf-‐>registerPdfPart( new ezcDocumentPdfHeaderPdfPart( new ezcDocumentPdfFooterOptions( array( 'showPageNumber' => false, 'height' => '10mm', ) ) ) ); $pdf-‐>createFromDocbook( $document-‐>getAsDocbook() ); file_put_contents( __FILE__ . '.pdf', $pdf );
Bibliotheken Programmatisch FPDF/FPDI PDF-PHP/CPDF Zend_Pdf pdflatex PDFlib lite TCPDF PDFlib
FPDF PHP 4 Nicht mehr weitergeführt
FPDI Zum Import von PDF-Dateien
PHP-PDF/CPDF Kommerzielle Bibliothek Free for Non-Commercial use
Zend_Pdf Wird aktuell nicht weiterentwickelt Rewrite steht z.Zt. nicht an
Basiert auf PDF-1.4 Einziges Projekt, das PDFs bearbeiten kann!! Sauberer OO-PHP-Code
pdflatex Kein „in-memory“ erzeugen einer PDF-Datei Lässt sich wunderbar auslagern
LaTeX-Kentnisse
libHaru Freie PDF-Bibliothek Länger keine Updates C-Bibliothek auch für andere
Sprachen
pdflib lite Stand von PDFlib 7 Nur für Nicht-Kommerzielle OpenSource-
Projekte Kein Support
TCPDF Free & OpenSource Dokumentation lässt zu wünschen übrig. Nicola
Asuni steht hinter TCPDF Import von PDF-Dateien nur über FPDI Signierte PDFs sind einfach zu erstellen Funktionsumfang ausreichend Code smells....
PDFlib teuer, ClosedSource Dokumentation Thomas Merz stehen hinter PDFlib C-Bibliothek
auch für andere Sprachen nutzbar Neueste Features aus PDF
Vergleich
Vergleich TCPDF PDFlib Kosten Lizenz PDF erstellen PDF bearbeiten PDF
importieren verschlüsseln Geschwindigkeit Standards Schrifttypen Sprache 0,- ab 800,- € GPL3 Commercial ✔ ✔ ✘ ✘ ✔ (mit FPDF) ✔ (Je nach Lizenz) ✔ ✔ (mit Zusatzprodukt) 10 PDF in > 10 s 50 PDF in 4,08s PDF/A-1b PDF/A1-3, PDF/X1-4, PDF/VT, PDF/UA TrueType, OpenType(TTF), Type1, CID TrueType, OpenType, Type1, CID PHP C
Code-Beispiele Zu finden unter https://github.com/heiglandreas/pdfexamples
ressources http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/ pdfs/pdf_reference_1-7.pdf http://www.w3.org/TR/REC-html40/ http://www.pdfx-ready.ch/index.php?show=496 https://github.com/dompdf/dompdf http://html2pdf.fr/de/default https://de.wikipedia.org/wiki/PdfTeX https://github.com/psliwa/PHPPdf https://github.com/zetacomponents/Document
http://www.fpdf.org https://github.com/lsolesen/fpdi https://github.com/johnwhitington/cpdf-source http://framework.zend.com/manual/1.12/de/zend.pdf.usage.html http://libharu.org http://pdflib.com http://tcpdf.org
Fragen?
Danke!