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

Add additional error checking for createMergedFile method #3

Open
4 tasks
jerboa88 opened this issue May 11, 2022 · 0 comments
Open
4 tasks

Add additional error checking for createMergedFile method #3

jerboa88 opened this issue May 11, 2022 · 0 comments
Labels
🛡 Priority: Low Issue is of low priority ⏰ Status: Confirmed Issue has been reproduced 🗃 Type: Enhancement New feature or request

Comments

@jerboa88
Copy link
Owner

What feature would you like?
Add additional error checking to the createMergedFile method of PDFManager to help avoid unexpected bugs. Since this method is only called once we can afford to do extra checks. For example:

  • Check that at least 1 PDF file has been added
  • Check that the size of the fileIds array matches the size of the file map
  • Add a separate try/catch block for setting metadata so that we can soft-fail and return a warning to the user instead of cancelling the merge altogether when there is an error
  • Figure out if it is possible to return warnings generated by pdf-lib. If some of the input files are only partially corrupted, it is still possible to merge them atm. However, pdf-lib displays warnings in the console when it encounters parsing issues so it would be good to inform the user that there were issues with the input files
@jerboa88 jerboa88 added ⏰ Status: New Issue has not been investigated yet 🗃 Type: Enhancement New feature or request ⏰ Status: Confirmed Issue has been reproduced 🛡 Priority: Medium Issue is of medium priority and removed ⏰ Status: New Issue has not been investigated yet labels May 11, 2022
@jerboa88 jerboa88 added 🛡 Priority: Low Issue is of low priority and removed 🛡 Priority: Medium Issue is of medium priority labels Jun 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛡 Priority: Low Issue is of low priority ⏰ Status: Confirmed Issue has been reproduced 🗃 Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant