PDFs à la volée avec TCPDF

Download PDFs à la volée avec TCPDF

Post on 19-Jan-2017

2.455 views

Category:

Internet

1 download

Embed Size (px)

TRANSCRIPT

Prsentation PowerPoint

TCPDFPDFs la vole avec@jennybeaumont#wptech

PDF

Portable Document Format

Portable Document Format

PDFDvelopp par Adobe1re sortie 1993Format propritaire jusquen 2008ISO TC 171 SC 2 WG 8 (v1.7)

In 2008 Adobe Systems' PDF Reference 1.7 became ISO 32000:1:2008. Thereafter, further development of PDF (including PDF 2.0) is conducted by ISO's TC 171 SC 2 WG 8 with the participation of Adobe Systems and other subject matter experts.5

La spcificit du PDF est de prserver la mise en forme dun fichier polices d'critures, images, objets graphiques, etc. telle qu'elle a t dfinie par son auteur, et cela quels que soient le logiciel, le systme d'exploitation et l'ordinateur utiliss pour limprimer ou le visualiser.

https://fr.wikipedia.org/wiki/Portable_Document_Format

Typos intgres (ou pas !)Photos / Graphiques vectorielsPaginationCodes barres / QRSignatures lectroniques Formulaires dynamiquesExtensible XML, javascript

Document vivant

FacturesBillets de train / avioneBooksCVs, courriersImpts

Le PDF est partout

Le standard, grce Internet, la facilit denvoyer par mail, mettre disposition au tlchargement. Puis archiver, partager et imprimer.8

Quels usages ?Quelles considrations ?Quelles contraintes ?PDF + WP

In 2008 Adobe Systems' PDF Reference 1.7 became ISO 32000:1:2008. Thereafter, further development of PDF (including PDF 2.0) is conducted by ISO's TC 171 SC 2 WG 8 with the participation of Adobe Systems and other subject matter experts.9

Client manufactures industrial plastersLots of technical information about productsClient wanted to be able to frequently update product info for PDFs. CPT created to manage both the product page, with minimum info for view on site, and for technical spec sheet with more complete info to be downloaded as PDF.

11

Le dfiMise en page complexeCPT, taxonomies, champs personnalissAucune page correspondanteMultilingue

529 plugins avec recherche pdfNot all for generating PDFs (PDF image generator, PDF embed, PDF Viewers, etc)Basic usage: print your current page

14

LimitationsPeu doptions pour la mise en pagePas doptions pour inclure des champs personnalissSortie uniquement pour la page active

Like creating a template for an emailTablesLimited CSS, no external style sheetDifficulty of translating image sizesTranslatable

18

Abordable en simple HTML (comme pour un template email)Certaines contraintes de CSSDifficults dans le maitrise de la conversion des units de mesure des imagesCONCLUSIONS

In 2008 Adobe Systems' PDF Reference 1.7 became ISO 32000:1:2008. Thereafter, further development of PDF (including PDF 2.0) is conducted by ISO's TC 171 SC 2 WG 8 with the participation of Adobe Systems and other subject matter experts.19

Le dfiTypos intgresSVG avec user prfsTaille adapte aux imagesMarques de dcoupeCompatible WooCommerce

Solutions alternativesPDFLib (sous licence)http://www.pdflib.com/fileadmin/pdflib/pdf/purchase_order/PDFlib-9-purchase-order.pdfFPDFhttp://www.fpdf.org DOMPDF https://github.com/dompdf/dompdfwkhtmltopdfhttp://wkhtmltopdf.org/

FPDF doesnt list SVG support (2001) - wp pluginsDOMPDF (used in woocommerce PDF Invoices) (2005) - wp pluginsWkhtmltopdf 2008 discovered recently (no plugins)24

TCPDFClass PHP open source http://www.tcpdf.org/Dvelopp par Nicola Asuni (2001) SourceForge / GitHub 6.0.090 (aot 2014)Active v6.2.12 (sept 2015)

Fonctionnalits principalesNo external libraries are required for the basic functions;All standard page formats, custom page formats, custom margins and units of measure;UTF-8 Unicode and Right-To-Left languages;TrueTypeUnicode, OpenTypeUnicode, TrueType, OpenType, Type1 and CID-0 fonts;Font subsetting;Methods to publish some XHTML + CSS code, Javascript and Forms;Images, graphic (geometric figures) and transformation methods;Supports JPEG, PNG and SVG images natively1D and 2D barcodesICC Color Profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;Automatic page header and footer management;Document encryption up to 256 bit and digital signature certifications;Transactions to UNDO commands;PDF annotations, including links, text and file attachments;Ttext rendering modes (fill, stroke and clipping);Multiple columns mode;No-write page regions;Bookmarks and table of content;Text hyphenation;Text stretching and spacing (tracking/kerning);Automatic page break, line break and text alignments including justification;Automatic page numbering and page groups;Move and delete pages;Page compression (requires php-zlib extension);XOBject templates;PDF/A-1b (ISO 19005-1:2005) support.

CONCLUSIONSToutes les typos ne sont pas galesContraintes dans la taille des SVGsCertaines incompatibilits avec des tierces parties

In 2008 Adobe Systems' PDF Reference 1.7 became ISO 32000:1:2008. Thereafter, further development of PDF (including PDF 2.0) is conducted by ISO's TC 171 SC 2 WG 8 with the participation of Adobe Systems and other subject matter experts.31

Extensions WP pour dmarrerWP Post to PDF Enhancedhttps://wordpress.org/plugins/wp-post-to-pdf-enhanced/TCPDF Libraryhttps://wordpress.org/plugins/tcpdf/

Ressourceshttps://en.wikipedia.org/wiki/Portable_Document_Formathttps://en.wikipedia.org/wiki/List_of_PDF_software#Development_librarieshttp://www.tcpdf.org/http://fonts.snm-portal.comhttp://www.pdfa.org/2015/06/what-will-pdf-2-0-bring/http://www.jennybeaumont.com/testing-tcpdf-css/

5-6 fvrier #wcparis

@jennybeaumont#wptech

Recommended

View more >