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

Text in Pdf File is Not Visible #9137

Closed
drweb86-work opened this issue Nov 15, 2017 · 5 comments
Closed

Text in Pdf File is Not Visible #9137

drweb86-work opened this issue Nov 15, 2017 · 5 comments

Comments

@drweb86-work
Copy link

Hello

Upon converting file
file_from.docx
to pdf with UseOffice
file_to.pdf
I'm seeing nothing when using Pdf.Js as viewer instead of text
nothing at viewer

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Nov 15, 2017

WFM, when opening that file with https://mozilla.github.io/pdf.js/web/viewer.html.

From the screen-shot, this appears to be a custom PDF.js implementation. However, since most of the information requested in https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md is missing, it's difficult to help here.
Please provide all of the requested information, and if this issue is limited to a custom implementation you'll need to provide a link it.

@drweb86-work
Copy link
Author

drweb86-work commented Nov 15, 2017

Hello

Web browser and its version: Chrome 61.0.3163.100 (Official Build) (64-bit)
Operating system and its version: Windows 10
PDF.js version: pdfjs-dist 1.10.97

this.pdfDocument
.getPage(this.currentPage)
.then((page: PDFPageProxy) => { here we're rendering at canvas })
Warning: Error during font loading: this._map[charCode].charCodeAt is not a function

@Snuffleupagus
Copy link
Collaborator

Please try opening your file with the default viewer available at https://mozilla.github.io/pdf.js/web/viewer.html (using the "Open file" button on the right-hand side of the toolbar); does it render correctly there?

Again, based on your screen-shot, if this is only an issue with a custom PDF.js implementation, you'll need to provide access to it (as requested in both https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md and https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md).

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Nov 15, 2017

Warning: Error during font loading: this._map[charCode].charCodeAt is not a function

Based on this edit, the issue seems to be that you're using a library that adds properties to Arrays (or maybe Objects) in an incorrect way.
Please refer to the discussion in issues such as #7064, #8495, #8711, of which this is thus a duplicate.

@drweb86-work
Copy link
Author

Hi
I manged to fix this issue

The problem was that pdf.js does not render pdf by itself (!). There was a file app.worker.js which was needed to be added (!!!)

#7612

I followed instructions of wojtekmaj and it started working!

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

No branches or pull requests

3 participants