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

Font Not loading Correctly #13907

Closed
devfadl opened this issue Aug 18, 2021 · 6 comments
Closed

Font Not loading Correctly #13907

devfadl opened this issue Aug 18, 2021 · 6 comments

Comments

@devfadl
Copy link

devfadl commented Aug 18, 2021

I'm running into issues that font not loaded correctly .
i use disableFontFace = false
like below:
let loadingTask = pdfjsLib.getDocument({
data: this.pdfBase64string,
disableFontFace: false
});
when using disableFontFace = true the file content not loaded.

Attach (recommended) or Link to PDF file here:

pdf.pdf

Configuration:

Web browser and its version: chrome Version 92.0.4515.131
Operating system and its version: Windows 10
PDF.js version: 2.9.359
Is a browser extension: no

Thank you.

@Snuffleupagus
Copy link
Collaborator

When opening an issue, please provide all of the information requested in https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md since as-is this is unfortunately missing every single piece of information required to be actionable/valid.

@devfadl
Copy link
Author

devfadl commented Aug 18, 2021

When opening an issue, please provide all of the information requested in https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md since as-is this is unfortunately missing every single piece of information required to be actionable/valid.

thanks , just update the issue and add missing info

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Aug 18, 2021

thanks , just update the issue and add missing info

No, unfortunately you haven't since the first and most important piece is still missing here:

Attach (recommended) or Link to PDF file here:

Furthermore, please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.

@devfadl
Copy link
Author

devfadl commented Aug 18, 2021

thanks , just update the issue and add missing info

No, unfortunately no haven't since the first and most important piece is still missing here:

Attach (recommended) or Link to PDF file here:

Furthermore, please see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us in the Matrix room -- keep in mind that just code snippets won't help us troubleshoot the problem.

Sorry for that , file Uploaded !

@Snuffleupagus
Copy link
Collaborator

WFM, when testing with PDF.js version 2.11.91 (as built-in to Firefox Nightly 93).

Most likely this was fixed by PR #12726, which was first released in https://github.com/mozilla/pdf.js/releases/tag/v2.10.377

@devfadl
Copy link
Author

devfadl commented Aug 19, 2021

after more investigation , it was issue related to direction of html.
so when using direction rtl the font is not rendered correctly and it was my problem.
so you should use dir : ltr or style: direction:ltr on top of div or canvas.
after do that the file rendered as same as original file.

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

No branches or pull requests

2 participants