How do set the option disableFontFace to false ? It is not an option in PDFJS anymore you can see at #6742, and then im falling into #4244.
It says - "We will remove any PDFJS.xxxx properties in the future. This one is probably belong to render() parameters." So, how do it works? I wasnt able to go through with this.
Configuration:
You can pass disableFontFace
as a parameter to the getDocument
API call. Refer to https://github.com/mozilla/pdf.js/commit/0ecc22cb04b54e57bbe0e498791f9a604c8c2e57#diff-304ad4918827181a1d1f52f5803717cdL64 for an example (note that we only removed that because we now handle this automatically for NodeJS environments, but this is the good way to pass the parameter) and https://github.com/mozilla/pdf.js/blob/master/src/display/api.js#L164 for the API documentation.
I'm doing it like
pdfjsLib.getDocument(url, { disableFontFace: true }).then(doc) => {}
but seems like nothing changed, it does not fallback, or what should I expect?
The getDocument
call only expects one parameter, not two. I think it should be:
pdfjsLib.getDocument({ url, disableFontFace: true }).then(doc) => {...}
since url
is also part of the DocumentInitParameters
, just like disableFontFace
(https://github.com/mozilla/pdf.js/blob/master/src/display/api.js#L111).
I'm fucking dumb, thanks for the help, you're right, i didnt pay attention to that
No worries, and good luck!