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

fix: Add optional support for pdf2json v2 #97

Merged
merged 2 commits into from
Dec 11, 2021

Conversation

k2s
Copy link
Contributor

@k2s k2s commented Dec 7, 2021

This makes pdfreader compatible with version before and after pdf2json@2.

It still uses pdf2json@1.2.5 not to break functionality, because v2 contains breaking changes in JSON structure. See readme in pdf2json for details on breaking changes on output JSON format.

For PDF I am processing, the only difference between 1.2.5 and 2.0.0 ismissing "clr": 0,.

pdf2json below v2 seams not to work with nodejs v16 and above. I was not searching for reason, but with my changes it is easy to switch to pdf2json@2..0.0 by adding this to package.json:

{
  "dependencies": {
    "pdfreader": "file:/home/k2s/Dev/curo/npm-pdfreader"
  },
  "resolutions": {
    "pdf2json": "2.0.0"
  }
}

@k2s k2s mentioned this pull request Dec 7, 2021
@adrienjoly
Copy link
Owner

Thanks for your contribution!

In order to make checks pass, can you run npm run prettier:fix then commit and push the resulting changes please?

@adrienjoly adrienjoly changed the title add optional support for pdf2json v2 fix: Add optional support for pdf2json v2 Dec 11, 2021
Copy link
Owner

@adrienjoly adrienjoly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Thanks for your contribution, @k2s ! 🙌

For reference, this may fix #95.

@adrienjoly adrienjoly merged commit e94a8f9 into adrienjoly:master Dec 11, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.2.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

2 participants