-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Checkbox not checked #961
Comments
hello @stefandutoit , did you manage to find a solution to your issue, i'm having the same one ? I think I found a solution :
with
I guess there are issues with the library provided from the cdn 🤔 |
Yeah @78raoul78, it's definitely the case here! Could reproduce it. With remote workerSrc, I got this in the console:
while with local worker, I got:
So it looks like this checkmark is rendered using some custom fonts that cannot be fetched using remote worker... 🤔 |
Yep - there are "standard fonts" involved here., used in PDF standard before version 1.5. From p. 255:
The solution is simple: add standardFontDataUrl to options, similarly to how cMapsUrl is set:
|
thanks it worked but FYI import pdfjsWorker from "react-pdf/dist/esm/pdf.worker.entry"; |
Before you start - checklist
Description
If the PDF below is opened and viewed using 'react-pdf' (v5.7.1), the checkbox 4.10 (Retail Trade) on page 1 is not checked. Viewing the PDF with another viewer (Adobe or Mozilla PDF.js) shows the same checkbox correctly checked.
Certificate 110608.pdf
Steps to reproduce
Expected behavior
On Page 1, checkbox 4.10 (Retail Trade) should be checked. The screenshot below is using the Adobe PDF / Mozilla PDF.js Viewer.
Actual behavior
On Page 1, checkbox 4.10 (Retail Trade) should be checked. It is not checked. The screenshot below is using 'react-pdf' library.
The only hint is that the following is shown in Browser Console when the PDF is opened.
Warning: loadFont - translateFont failed: "TypeError: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from undefinedFoxitDingbats.pfb".
pdf.js:479 Warning: Error during font loading: Failed to execute 'fetch' on 'WorkerGlobalScope': Failed to parse URL from undefinedFoxitDingbats.pfb
Additional information
Environment
Browsers:
Chrome - Version 99.0.4844.51 (Official Build) (64-bit)
Edge - Version 99.0.1150.36 (Official build) (64-bit)
React-PDF: 5.7.1
React: 16.13.1
The text was updated successfully, but these errors were encountered: