-
Notifications
You must be signed in to change notification settings - Fork 2
pdf template for Contao 4.4 (EN)
With the pdf-template extension, you can style the PDF output in the article (syndication) with a PDF template file.
With the extension pdf-template, a saved PDF template file can serve as a layout template for PDF output. The template must be in PDF Specification 1.4 format. The template can contain one or more pages, which are transferred to the output in order. If more pages are output than are present in the template, the last page repeats until the end of the output.
The settings are made in the "Website root" and apply on all pages below this starting point. This makes it possible to use different PDF layouts depending on language or domain. Depending on the layout, the margins of the text output can be set so that the header or footer area of the layout is not overwritten by the articles.
The HTML and CSS support of TCPDF is very limited.
Supported tags are: a, b, blockquote, br, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, img, li, ol, p, pre, small, span, strong, sub, sup, table, tcpdf, td, th, thead, tr, tt, u, ul
NOTE: all the HTML attributes must be enclosed in double-quote.
For the output, the extension adds its own CSS in /files/tcpdf.css, which can also be disabled in the settings. With the CSS instructions you have to try a lot, there is unfortunately no current list, of supported CSS by TCPDF. Often it is not only a class to specify, but if you specify the element with it works. Example: .myclass does not work, div.myclass works.
Softleister - 2017-08-05
The extension is based on the FPDI module developed by Setasign - Jan Slabon (https://github.com/setasign)