-
Notifications
You must be signed in to change notification settings - Fork 0
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
Hey i am getting this error "Warning: fetchStandardFontData: failed to fetch file "LiberationSans-Bold.ttf" is there way how i can fix this?? #1
Comments
I haven't been tackling PDF.js for a while but I do remember there is such a warning. I didn't fix it because it's a warning and I don't use PDF.js to render anything. If you don't really need to render the PDF, you can ignore this warning, too. But if you need to, the warning message indicates that you have to specify a parameter which tells PDF.js where "standard fonts" are, as explained by react-pdf. Here is another issue under PDF.js for your reference: mozilla/pdf.js#4244 |
Thanks for the reply!! By the way, I tried to provide the path for the standard font, but I'm still encountering the same error. My terminal is filled with the same error message. This is how I'm providing the path: const pdf = await getDocument({
data: uint8Array,
standardFontDataUrl:
"{....}/node_modules/pdfjs-dist/standard_fonts"
}).promise; However, I still don't know why I'm getting the error. |
The error message should be a bit different after you provide Also, if you plan to run PDF.js in a browser, you need to fill in Otherwise, if you plan to run PDF.js in serverless function, you probably need to figure out how to make Webpack copy the entire |
@Luluno01 Reallyyy, thank you so much, man!! I was just so frustrated with that warning, and the issue was just this --> '/ ' |
Hey there,
I noticed your previous conversations regarding this issue, so I thought I'd ask if you could help me with it. Basically, I'm encountering this error and I don't know how to fix it:
Warning: fetchStandardFontData: failed to fetch file "LiberationSans-Regular.ttf" with "UnknownErrorException: The standard font "baseUrl" parameter must be specified, ensure that the "standardFontDataUrl" API parameter is provided.".
Please help me if you know how to deal with this.
The text was updated successfully, but these errors were encountered: