Breaking: #46 - Move view rendering to the PdfService
See Pull Request #46
Description
\Extcode\ no longer renders Fluid views. It
only arranges the content of the PDF. Creating and rendering the views moved
to \Extcode\, which hands the rendered content
over to the Tcpdf. This separates the rendering of the content from
the PDF library.
This changes the public API introduced in 8.0:
TcpdfandWrapper:: create View () Tcpdfare removed. The views are created and rendered by private methods of theWrapper:: render View () Pdfnow. Templates are resolved via the TypoScript settingService view..template Root Paths - The constructor and
Tcpdfno longer expect aWrapper:: create With Type And Settings () \TYPO3\as first argument.CMS\ Core\ View\ View Factory Interface - The HTML parts of header and footer are no longer rendered by
TcpdfandWrapper:: Header () Tcpdf. TheWrapper:: Footer () Pdfrenders them before the first page is added and passes them via the new methodsService TcpdfandWrapper:: add Header Part () Tcpdf.Wrapper:: add Footer Part ()
The configuration via TypoScript and the templates are unchanged. The rendered documents do not change.
Affected Installations
Installations which create a Tcpdf or call
Tcpdf or Tcpdf in their own
code, e.g. in an own implementation of
\Extcode\ or in a class
extending Tcpdf.
Installations which configure the documents via TypoScript and templates only are not affected.
Migration
- Remove the
\TYPO3\argument fromCMS\ Core\ View\ View Factory Interface new TcpdfandWrapper () Tcpdf.Wrapper:: create With Type And Settings () - Create and render own views with
\TYPO3\and write the rendered content withCMS\ Core\ View\ View Factory Interface Tcpdf.Wrapper:: write Html Cell With Config () - Render own header and footer parts in advance and pass them via
TcpdfandWrapper:: add Header Part () Tcpdf.Wrapper:: add Footer Part ()