-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't display Pagenumber in Footer with custom Font #187
Comments
@WinkiG Thanks for your bug report! I had a look at the issue and I can easily reproduce this with a simple example: <pdf:document>
<pdf:page>
<pdf:text fontFamily="roboto">{pdf:getPageNumberAlias()}</pdf:text>
</pdf:page>
</pdf:document> It seems to be an issue with the order in which we do the rendering in the Can you try to apply the following patch and test whether that works for you? diff --git a/Classes/ViewHelpers/AbstractTextViewHelper.php b/Classes/ViewHelpers/AbstractTextViewHelper.php
index a91ceb7..cb72d7f 100755
--- a/Classes/ViewHelpers/AbstractTextViewHelper.php
+++ b/Classes/ViewHelpers/AbstractTextViewHelper.php
@@ -98,6 +98,10 @@ abstract class AbstractTextViewHelper extends AbstractContentElementViewHelper
$this->mergeSettingsAndArguments();
+ if ($this->validationService->validateFontFamily($this->arguments['fontFamily'])) {
+ $this->getPDF()->SetFont($this->arguments['fontFamily'], $this->conversionService->convertSpeakingFontStyleToTcpdfFontStyle($this->arguments['fontStyle']));
+ }
+
if (empty($this->arguments['text'])) {
$this->arguments['text'] = $this->renderChildren();
}
@@ -126,10 +130,6 @@ abstract class AbstractTextViewHelper extends AbstractContentElementViewHelper
$this->getPDF()->SetFontSize($this->arguments['fontSize']);
}
- if ($this->validationService->validateFontFamily($this->arguments['fontFamily'])) {
- $this->getPDF()->SetFont($this->arguments['fontFamily'], $this->conversionService->convertSpeakingFontStyleToTcpdfFontStyle($this->arguments['fontStyle']));
- }
-
if ($this->validationService->validateLineHeight($this->arguments['lineHeight'])) {
$this->getPDF()->setCellHeightRatio($this->arguments['lineHeight']);
}
However I will have to further investigate the issue to find out whether that is already the proper solution. |
@maechler thanks for the fast reply. |
I'm using the Custom-Font Arial in my document
the Font displayes correctly in the whole document except the Footer.
heres the relevant part of my ts
and my html of the footer:
heres the output:
this happens only when i include the Viewhelpers in the footer. normal text ist displayed correctly. and the viewhelpers are also working correctly when used anywhere else...
TYPO3 version(s): 10.4.20
pdfviewhelpers version: 2.3.5
The text was updated successfully, but these errors were encountered: