We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have tried multiple ways to add Google fonts to the pdf but nothing worked for me.
Can you help me how to add the fonts style to pdf?
The text was updated successfully, but these errors were encountered:
Write: font-family: Inter; instead of: font-family: "Inter";
Sorry, something went wrong.
Hi, You can add any font to the PDF by adding in your java code:
renderer.getFontResolver().addFont("src/main/java/com/app/font/Aptos.ttf", true);
And then, set the font in your HTML/CSS file:
body { font-family: Aptos, sans-serif; }
@himwak2001 Thank you for the answer. Just a small remark: it's better to put such resources to folder src/main/resources instead of src/main/java.
src/main/resources
src/main/java
@asolntsev Thankyou for your suggestion.
No branches or pull requests
I have tried multiple ways to add Google fonts to the pdf but nothing worked for me.
Can you help me how to add the fonts style to pdf?
The text was updated successfully, but these errors were encountered: