.. ================================================== .. FOR YOUR INFORMATION .. -------------------------------------------------- .. -*- coding: utf-8 -*- with BOM. .. include:: ../../Includes.txt .. _headerandfooter: Header and Footer ================= .. _headerandfooter_typoscript: TypoScript ---------- :: pdfpage = PAGE pdfpage { 10 = FLUIDTEMPLATE 10 { file = EXT:pdfviewhelpers/Resources/Public/Examples/HeaderAndFooter/Template.html } # ensure there is no other output apart from the pdf # take a look at the generated pdf file (end!) in a text editor to verify there is no other output # like warnings, error messages or html code config { disableAllHeaderCode = 1 xhtml_cleaning = 0 admPanel = 0 } } plugin.tx_pdfviewhelpers.settings { page { autoPageBreak = 1 margin { top = 25 bottom = 25 } } header { posY = 10 } footer { posY = -15 } } module.tx_pdfviewhelpers < plugin.tx_pdfviewhelpers .. _headerandfooter_fluid: Fluid Template -------------- :: Bithost GmbH Milchbuckstrasse 83 - 8057 Zürich Page {pdf:getPageNumberAlias()} of {pdf:getTotalNumberOfPagesAlias()} Bithost GmbH Milchbuckstrasse 83 CH-8057 Zürich 044 585 28 20 First page different First page - different header and footer applied. Page 2 - document wide header and footer applied. Change footer only on first page even if page break occurs. Page 3 - document wide header but page specific footer applied. Page 4 - Again document wide header and footer applied. .. _headerandfooter_output: PDF Output ---------- .. figure:: _assets/output_1.png :width: 600px :align: left :alt: Header and Footer example output | .. figure:: _assets/output_2.png :width: 600px :align: left :alt: Header and Footer example output | .. figure:: _assets/output_3.png :width: 600px :align: left :alt: Header and Footer example output | .. figure:: _assets/output_4.png :width: 600px :align: left :alt: Header and Footer example output |