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

Disappear non-ascii string on pdf #16

Closed
azu opened this issue May 8, 2017 · 1 comment · Fixed by #89
Closed

Disappear non-ascii string on pdf #16

azu opened this issue May 8, 2017 · 1 comment · Fixed by #89

Comments

@azu
Copy link

azu commented May 8, 2017

Currently, react-pdf-js not show non-ascii content.
because, pdf.js fail to load cmap file.

GET http://localhost:8082/nullAdobe-Korea1-UCS2 404 (Not Found)

pdf-js test 2017-05-08 16-22-23

Original pdf: https://github.com/azu/react-pdf-js-non-ascii/blob/master/public/resources/presentation.pdf (I have expected to show this)

I can shown non-ascii string by some hack.
(This hack come from https://github.com/azu/pdf.js-controller/blob/29c3312400de23c8cfa5bb185700baddb0261a75/src/PDFJSController.js#L25-L26 )

// hack for non-ascii pdf content
// dynamic loading cMap files
window.PDFJS.cMapUrl = `/pdfjs-dist/cmaps/`;
window.PDFJS.cMapPacked = true;

pdf-js test 2017-05-08 16-24-31

Reproduce repository: https://github.com/azu/react-pdf-js-non-ascii

Is there any chance react-pdf-js support non-ascii content?

@mikecousins
Copy link
Owner

If you can get it going on here I'd love a PR for it.

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

Successfully merging a pull request may close this issue.

2 participants