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
Translation for the key is missing. #559
Comments
I am getting a long list of warnings in Chrome I have tried all option mentioned on Environment: package.json: angular.json: {
"glob": "**/*",
"input": "node_modules/ngx-extended-pdf-viewer/assets/",
"output": "/assets/"
} HTML code: <ngx-extended-pdf-viewer
[base64Src]="pdFileData"
[useBrowserLocale]="true"
height="50vh"
[showOpenFileButton]="false"
[showBookmarkButton]="false"
[showSecondaryToolbarButton]="false"
[showPresentationModeButton]="true"
[textLayer]="true">
</ngx-extended-pdf-viewer> Please help me to fix this. Thanks |
Can you upload a screenshot of the network tab? Probably your application can't access the language files. |
All right, that clarifies things a lot. At first glance, the However, you're also showing the content of the Here's what to do:
|
Does this solve your bug? Usually I don't close the ticket until I know it's solved, so I'd appreciate a short "ping". :) Best regards, |
Please let me check all stuff. |
@stephanrauh, you save my day. Thank you very much. 👍 Actually, I am using two child app under a single angular environment. I think that's the reason, the browser loads the locale.properties from the wrong path. I have added this line in PDF viewer, That fixed the issue. Now my HTML code is: <ngx-extended-pdf-viewer
[base64Src]="pdfFileData"
[useBrowserLocale]="true"
height="50vh"
[showOpenFileButton]="false"
[showBookmarkButton]="false"
[showSecondaryToolbarButton]="false"
[showPresentationModeButton]="true"
[textLayer]="true"
**localeFolderPath="dist/PROJECT_NAME/assets/locale"**>
</ngx-extended-pdf-viewer> Once again thanks for the quick reply and guidance. Best Regards, |
The last thing, I have another warning for some specific pdf files (not for all files). util.js:337 Warning: The font embedded in the PDF file contains errors: TT: undefined function: 32 Can you please guide me, how can I get rid of this one? |
I'm afraid I can't. I've seen the "undefined function: 32" message several times, too. As far as I can see, the PDF file is broken, but it's not broken too badly to be displayed properly. @timvandermeij Tim, this time I don't request your help, but I'm curious. Google didn't manage to shed light on the topic. What's causing the message "Warning: The font embedded in the PDF file contains errors: TT: undefined function: 32"? |
PDF.js tries to recover bad fonts, i.e., font data that doesn't adhere to the specification. If it falls back to recovery mode, it prints this message. See also mozilla/pdf.js#3768 (comment). In short, the font data is invalid, but PDF.js is able to recover. To get rid of this, the PDF file should be regenerated with valid font data. Note that it's a warning, not an error, generated here: https://github.com/mozilla/pdf.js/blob/46e60a266cc9bdb6ff952accc3957798fcb29826/src/core/fonts.js#L2524-L2545 |
(see next message)
The text was updated successfully, but these errors were encountered: