Skip to content
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

Getting error while adding custom font. #203

Closed
rassemdev opened this issue Mar 11, 2024 · 1 comment
Closed

Getting error while adding custom font. #203

rassemdev opened this issue Mar 11, 2024 · 1 comment

Comments

@rassemdev
Copy link

I am using setasign/fpdi: 2.3 and setasign/fpdf 1.8 on my laravel project to generate pdf. On my application i am using a custom font on my pdf name (dancing-script). But when i am trying to generate the pdf i am getting this error:

"message": "include(1/dancing-script.regular.php): failed to open stream: No such file or directory",
"exception": "ErrorException",
"file": "/var/www/hc-digital-loan.com/vendor/setasign/fpdf/fpdf.php",
"line": 1137,

I have copied dancing-script.regular.php and dancing-script.regular.z on my /vendor/setassign/fpdf/font direct. Which seems was working on fpdf version 1.82 but not with 1.86. Can anyone help me how should i solve this problem?

@JanSlabon
Copy link
Member

Do not put any foreign/dynamic files into the vendor folder!

Put them into a separate folder an make use of the $dir parameter of the AddFont() method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants