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

update for v3 pdf.js #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

sterlingwes
Copy link

I needed a fix for RTL language support in pdf.js and found some issues pulling in a more recent version:

  • v4 made some big refactors around ESM modules and typescript that led the team to remove a module we're depending on (domstubs.js)
  • v3 had better support for the existing project structure with some minor tweaks:
    • new gulp dist path
    • promise not returned by getDocument call, now a "task" class wrapper with promise getter

I've updated the readme to make it clear what version of PDF.js is supported with these changes, since it seems that V4 will require a fairly significant overhaul

RE: the global require "hacks", I'm not sure how it worked before, but the existing require calls in parse-cmd were not making pdfjsLib available so i added an explicit require call to pdf-table-extractor.js. This tells me that the require for domstubs might not be necessary but I didn't check that since the code as-is works for my needs.

@HiiiXinyiii
Copy link

Highly recommend this PR. Thank you!

The referred project pdf.js has been updated. This PR has pointed out the right version and solved the related running issues.

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

Successfully merging this pull request may close these issues.

2 participants