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

Have trouble when pdf file has limited permissions #144

Open
biennui1998mu opened this issue Jun 25, 2024 · 0 comments
Open

Have trouble when pdf file has limited permissions #144

biennui1998mu opened this issue Jun 25, 2024 · 0 comments

Comments

@biennui1998mu
Copy link

Hi, I had trouble when using pdf-merger-js with file pdf have limited permission to access

image

const merger = new PDFMerger();
const fileError = [];

for (const file of files) {
  await merger.add(file.file).catch((e) => {
    console.log('files', file);
    fileError.push(file);
  });
}

If permission blocks Content copying, the lib will have an error reference with pageNumber, so I can try catch the error to handle it. But it will pass when permission is applied for Content copying but block other roles like this:

image

File example:
pdf-a.pdf

I can't share files with more limited permissions because it is a private file.

React version: 17.0.2
pdf-merger-js: 5.1.1
Node version: 16.20.0

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

No branches or pull requests

1 participant