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

Incompatibility with recent versions of pdfjs #419

Closed
jeromesimeon opened this issue Jun 25, 2021 · 0 comments · Fixed by #420
Closed

Incompatibility with recent versions of pdfjs #419

jeromesimeon opened this issue Jun 25, 2021 · 0 comments · Fixed by #420

Comments

@jeromesimeon
Copy link
Member

Bug Report 🐛

Recent versions of pdfs do not include es5 build files anymore, which is inconsistent with how we import the library in the markdown-pdf package:

let pdfjsLib = require('pdfjs-dist/es5/build/pdf.js');

This means importing the markdown-pdf library may result in failures.

Expected Behavior

We should be able to import the markdown-pdf package without error.

Current Behavior

Context (Environment)

  • We list the dependency using a ^ semver here:
    "pdfjs-dist": "^2.7.570",
  • The latest version of pdfjs-dist is 2.8.335 which is compatible with ^2.7.570
  • The content of 2.8.335 does not include an es5 directory anymore. See content in the attached file.

content.txt

Suggested fix

  • Import pdfjs-dist/build/pdf.js rather than pdfjs-dist/es5/build/pdf.js
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.

1 participant