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

Fix font styling in PDF #16

Open
barelyhuman opened this issue Apr 18, 2022 · 2 comments
Open

Fix font styling in PDF #16

barelyhuman opened this issue Apr 18, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@barelyhuman
Copy link
Owner

Currently the PDF doesn't match the font style or render style from the page,
need to add a service for that or fix it in the html2pdf.js package

@barelyhuman barelyhuman self-assigned this Apr 18, 2022
@barelyhuman barelyhuman added the bug Something isn't working label Apr 18, 2022
@itsmohmans
Copy link

itsmohmans commented May 30, 2023

I'm not sure if this is the same issue you're referring to, but the text in the generated PDF is just an image of the actual text, which means it can't be selected, and it's pixelated on zoom.

You can see the difference and how it should be if you convert the page to pdf using browser's print functionality (ctrl + p).

Edit: it seems to be an issue in html2pdf.js

Edit 2: Possible solution: Use node-wkhtmltopdf in a server-side environment, it should work with Nuxt server-side to generate the pdf.

@barelyhuman
Copy link
Owner Author

Yep, there’s a local branch with a reconstructed pdf over an edge function but I’m planning to add in auth and tabs to it soon. Will probably fix it with that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants