mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

Custom Header or Footer throw exception #72

Closed ghost closed 6 years ago

ghost commented 7 years ago

With Typo3 8, maybe older releases too, i can't create an pdf, when i used an own Header or Footer. The error is in the class "Mittwald\Web2pdf\View\PdfView" in the function "getPartial".

protected function getPartial($templateName, $arguments = array()) { /* @var $partial \TYPO3\CMS\Fluid\View\StandaloneView */ $partial = $this->objectManager->get('TYPO3\CMS\Fluid\View\StandaloneView'); $partial->setLayoutRootPath(GeneralUtility::getFileAbsFileName($this->options->getLayoutRootPath())); $partial->setPartialRootPath(GeneralUtility::getFileAbsFileName($this->options->getPartialRootPath())); $partial->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName($this->options->getPartialRootPath()) . 'Pdf/' . ucfirst($templateName) . '.html'); $partial->assign('data', $arguments); return $partial->render(); }

The functions "setLayoutRootPath" and "setPartialRootPath" doesn't exists. In the Typo3 Core it was updated to "setLayoutRootPath" and "setPartialRootPaths". Thanks for the repair

pstranghoener commented 7 years ago

Hey @chasperli feel free to make a Pull Request for that ;)