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
after adding Qr Image, other image background became green. #89
Comments
@jaypeevns Can you please share the code you are using to add the QR Code? Also, if you're able to provide the original PDF, that would help me to reproduce the issue. |
Hi Andrew, I can provide you the code but I can't give you pdf. in the pdf we are having 3 images and we are adding one qr code png in it. var { PDFDocumentFactory, PDFDocumentWriter, drawImage} = require('pdf-lib'); |
@Crunchyalex Nearly all PDF documents contain compressed data. And thus far, I've been unable to produce a similar result on any PDF I've tested. Can you please clarify what you mean by "compressed pdf"? Also, would you happen to have a sample PDF I can use to reproduce the issue? I don't think I'll be able to resolve this issue very quickly without access to a PDF I can test on. Or, alternatively, a way that I can generate such a PDF. |
Hi Andrew, I am attaching the template where we are facing issue. please attach any qr image on it and help me if you are able to replicate the issue. |
Hi andrew, Please let me know if you are able to replicate the issue. |
Hello @jaypeevns. I've been swamped with work and school lately. I'm afraid I haven't had a chance to look any further into this yet. I'll let you know as soon as I do. Hopefully within the next two weeks. |
Thanks Andrew, I am eagerly waiting your reply. |
Hello @jaypeevns! I finally got some time to investigate this today. The cause of this issue was several invalid strings being produced by Anyways, I was able to fix this in #100. With these changes, everything works smoothly, and the three images in your PDF no longer have green backgrounds. I just cut prerelease You can install this prerelease with npm:
It's also available on unpkg:
Please try it out and let me know if it works for you! @Crunchyalex I'd be grateful if you'd test this out as well. |
I've tested it with the exact same pdf as before, and it doesn't produce the same artifact on your prerelease build! |
Hi Andrew,
I am having a pdf in which we already have three images. Now I need to attach a QR code in it. when I am doing it pragmatically , I am getting green background on result pdf.
I am attaching before and after snapshot of pdf.
Please help us to resolve this issue.
Regards,
jay Prakash Verma
The text was updated successfully, but these errors were encountered: