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

All content in White color is rendered in black color and the content in black color is rendered as white color. #6071

Closed
vijith2712 opened this issue Jun 1, 2015 · 13 comments

Comments

@vijith2712
Copy link

When I am trying to view a document using PDFJS the content in white color is rendered in black color and the content in black color is rendered as white color.
using_pdfjs

using_other

@Snuffleupagus
Copy link
Collaborator

When reporting an issue, please make sure that you read https://github.com/mozilla/pdf.js/blob/master/CONTRIBUTING.md, paying special attention to the first paragraph. At the very least, you must provide a link to a PDF file that can be used to reproduce this issue!

@Snuffleupagus
Copy link
Collaborator

Closing as incomplete for now; please provide the information requested above to re-open.

@vijith2712
Copy link
Author

Jonas,
I have mailed the document to your mail id mentioned, as there is no provision to upload document here.

@Snuffleupagus
Copy link
Collaborator

https://www.dropbox.com/s/w5cb3li354rtgcb/issue6071.pdf?dl=0


@vijith2712 For future reference, when reporting issues:
If possible, please upload the PDF file to a file sharing service (e.g. Dropbox, Google Drive, Microsoft OneDrive or similar), and paste a link to the file in the issue, instead of sending it by email to individual contributors/developers.

Sending a PDF file by email should only be considered as a last resort for PDF files containing sensitive data, where making the PDF file publicly available through a file sharing service would pose a problem.

@vijith2712
Copy link
Author

Jonas,
Any updates on why this issue is happening.

@timvandermeij
Copy link
Contributor

The PDF contains a DeviceGray image with DecodeParams. Perhaps we do not handle those decode parameters correctly? It seems like a color inversion issue.

@vijith2712
Copy link
Author

Can we expect a fix for this issue in the next release? Can you please provide ETA for this issue?

@vijith2712
Copy link
Author

Any Update on fix for this issue?

@timvandermeij
Copy link
Contributor

When there are updates, we will provide them here. Currently there is no news.

@THausherr
Copy link
Contributor

The PDF contains a DeviceGray image with DecodeParams. Perhaps we do not handle those decode parameters correctly?

I think it's related to the predictor 2. This is related to issue #6289 but different bit size.

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Sep 22, 2016

Interestingly enough, if you skip the bits === 1 code-path in readBlockTiff, see src/core/stream.js#L740-L749, and instead fallback to the default one, see src/core/stream.js#L758-L783, the PDF file appears to render correctly. Hence it certainly seems plausible that the code for the bits === 1 case could be wrong in some edge-cases.

@mukulmishra18
Copy link
Contributor

if you skip the bits === 1 code-path in readBlockTiff, see src/core/stream.js#L740-L749, and instead fallback to the default one, see src/core/stream.js#L758-L783, the PDF file appears to render correctly

@Snuffleupagus, i also reproduced the condition mentioned above, but i am unable to understand what is going on in the code, can you please guide me how can i understand what code does.

josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 4, 2016
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 5, 2016
Corrects readBlockTiff() case for 1-bit depth TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 6, 2016
Corrects readBlockTiff() case for 1-bit depth TIFF images incorporated in
the PDF.

Corrected sintaxe according to style guide.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 6, 2016
Corrects readBlockTiff() case for 1-bit depth TIFF images incorporated in
the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 17, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in
the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 17, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 21, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 21, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 21, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 21, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Dec 21, 2016
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.
josealeixopc added a commit to PedroPachecoInf/pdf.js that referenced this issue Jan 10, 2017
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.

Adds reference test for PDF used to fix this issue.
yurydelendik added a commit that referenced this issue Jan 10, 2017
Fixes issue #6071 - TIFF with 1 bit-depth
@Snuffleupagus
Copy link
Collaborator

Closing as fixed by PR #7869.

movsb pushed a commit to movsb/pdf.js that referenced this issue Jul 14, 2018
Corrects readBlockTiff() case for 1-bit depth and 1 color TIFF images incorporated in the PDF.

Adds reference test for PDF used to fix this issue.
movsb pushed a commit to movsb/pdf.js that referenced this issue Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants