-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
PdfResponse::mpdfConfig does not allow fontDir #59
Comments
@JanKalach This is my working solution: $mpdf = $this->pdf->getMPDF();
$mpdf->fontdata += [
'arial' => [
'R' => 'arial-regular.ttf',
'B' => 'arial-bold.ttf',
'useOTL' => 0xff,
],
];
$mpdf->AddFontDirectory(__DIR__ . '/font');
$mpdf->AddFont('arial');
$mpdf->SetFont('arial'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mpdf can be created with config param fontDir.
When I add mpdfConfig with fontDir to PdfResponse
I become error:
Cannot write to an undeclared property [Mpdf\Mpdf]::$fontDir
[Mpdf\Mpdf]::$fontDir is set as private property (
vendor/mpdf/mpdf/src/Mpdf.php:283
)Using of Mpdf methods AddFontDirectory and AddFont do not apply changes, or font is not applied.
Fonts are used when the necessary configuration options are added to the object creation.
The text was updated successfully, but these errors were encountered: