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

Set custom font without access to "vendor" #141

Closed
mrchrisoliver opened this issue Dec 6, 2021 · 2 comments
Closed

Set custom font without access to "vendor" #141

mrchrisoliver opened this issue Dec 6, 2021 · 2 comments

Comments

@mrchrisoliver
Copy link

Hello,

I'm attempting to use this with Laravel, after colleagues have used it in other PHP projects without composer.
I'm trying to add a custom font using AddFont(). The font definition is PHP and we've used it on previous site. As this is a Laravel project, I don't have access to vendor folder to edit.

If I try to just reference the font definition file elsewhere in my project I get this: "FPDF error: Incorrect font definition file name:"

Any solution for this?

@JanSlabon
Copy link
Member

You need to move the font definition folder to a folder under your control and define the FPDF_FONTPATH constant: http://fpdf.org/en/doc/setfont.htm

PS: This isn't related to FPDI but more to FPDF ;-)

@mrchrisoliver
Copy link
Author

Amazing! Sorted it, thank you.

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