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

Wrong Base64 Output on some pages #114

Open
saargospa opened this issue Aug 13, 2021 · 1 comment
Open

Wrong Base64 Output on some pages #114

saargospa opened this issue Aug 13, 2021 · 1 comment

Comments

@saargospa
Copy link

Hello !

I was using this library to parse scanned pdfs, but some pages are getting a base64 not corresponding to the format, I attach my pdf demo and both base64. This is my config.

const convert = fromBase64(base64result, { width: 1500, height: 1942, density: 100, format: "jpeg" });

convert.bulk(-1, true).then((outputs: any) => {
  res.status(200).send({
    status: true,
    message: outputs,
    data: null
  }); return;

}).catch((err) => {
  res.status(200).send({
    status: false,
    message: "Error: " + err,
    data: null
  }); return;
});

Incripción con vigencia (1).pdf

First Page Base64 OK

firstPageBase64.txt

Second Page Base64 Wrong

secondPageBase64.txt

What I am doing wrong ?

@shivamagrawal3900
Copy link

Happening for me as well. Some of the pdfs aren't getting converted. For the rest, it's working fine.

The only difference seen with that pdf is that it says, optimize: yes in properties. Not sure if that's the reason but all other pdfs that I tried with had, optimize: no.

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

2 participants