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

PDF contents turns redacted (blackout) upon zoom-out to thumbnail size. #14521

Closed
dhanbhan opened this issue Feb 1, 2022 · 2 comments · Fixed by #14536
Closed

PDF contents turns redacted (blackout) upon zoom-out to thumbnail size. #14521

dhanbhan opened this issue Feb 1, 2022 · 2 comments · Fixed by #14536
Assignees
Labels

Comments

@dhanbhan
Copy link

dhanbhan commented Feb 1, 2022

Attach (recommended) or Link to PDF file here:

Sample Document :
Sample_blackout.pdf

Configuration:

  • Web browser and its version: Chrome, Firefox, MS Edge (latest versions)
  • Operating system and its version: Windows, Mac
  • PDF.js version: 2.12.313 (latest)
  • Is a browser extension: NA

Steps to reproduce the problem:

  1. Open attached Sample_blackout.pdf in pdfjs viewer
  2. Zoom out the document to lesser than 30% or verify the content in thumbnail view
  3. You will notice portion of the document content are turned black.

What is the expected behavior? : Document content should not change its style in thumbs view or while zoom out.

What went wrong? : document content are turned black and even some portions are redacted.

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): https://mozilla.github.io/pdf.js/web/viewer.html

Output in pdfjs viewer on zoom out :

blackedOutResponse

@Snuffleupagus
Copy link
Collaborator

I wonder if this is effectively a duplicate of e.g. issue #13211.

@Btow01

This comment was marked as duplicate.

@calixteman calixteman self-assigned this Feb 4, 2022
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 19, 2022
…743245)

 - it aims to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1753075, https://bugzilla.mozilla.org/show_bug.cgi?id=1743245, issue mozilla#13211 and issue mozilla#14521;
 - previously we were trying to adjust lineWidth to have something correct after the current transform is applied but this approach was not correct because finally the pixel is rescaled with the same factors in both directions.
  And sometimes those factors must be different (see bug 1753075).
 - So the idea of this patch is to apply a scale matrix to the current transform just before setting lineWidth and stroking. This scale matrix is computed in order to ensure that after transform, a pixel will have its two thickness greater than 1.
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 24, 2022
…743245, bug 1710019)

 - it aims to fix:
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1753075;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1743245;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1710019;
   - issue mozilla#13211;
   - issue mozilla#14521.
 - previously we were trying to adjust lineWidth to have something correct after the current transform is applied but this approach was not correct because finally the pixel is rescaled with the same factors in both directions.
  And sometimes those factors must be different (see bug 1753075).
 - So the idea of this patch is to apply a scale matrix to the current transform just before setting lineWidth and stroking. This scale matrix is computed in order to ensure that after transform, a pixel will have its two thickness greater than 1.
calixteman added a commit to calixteman/pdf.js that referenced this issue Feb 25, 2022
…743245, bug 1710019)

 - it aims to fix:
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1753075;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1743245;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1710019;
   - issue mozilla#13211;
   - issue mozilla#14521.
 - previously we were trying to adjust lineWidth to have something correct after the current transform is applied but this approach was not correct because finally the pixel is rescaled with the same factors in both directions.
  And sometimes those factors must be different (see bug 1753075).
 - So the idea of this patch is to apply a scale matrix to the current transform just before setting lineWidth and stroking. This scale matrix is computed in order to ensure that after transform, a pixel will have its two thickness greater than 1.
bh213 pushed a commit to bh213/pdf.js that referenced this issue Jun 3, 2022
…743245, bug 1710019)

 - it aims to fix:
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1753075;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1743245;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1710019;
   - issue mozilla#13211;
   - issue mozilla#14521.
 - previously we were trying to adjust lineWidth to have something correct after the current transform is applied but this approach was not correct because finally the pixel is rescaled with the same factors in both directions.
  And sometimes those factors must be different (see bug 1753075).
 - So the idea of this patch is to apply a scale matrix to the current transform just before setting lineWidth and stroking. This scale matrix is computed in order to ensure that after transform, a pixel will have its two thickness greater than 1.
rousek pushed a commit to signosoft/pdf.js that referenced this issue Aug 10, 2022
…743245, bug 1710019)

 - it aims to fix:
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1753075;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1743245;
   - https://bugzilla.mozilla.org/show_bug.cgi?id=1710019;
   - issue mozilla#13211;
   - issue mozilla#14521.
 - previously we were trying to adjust lineWidth to have something correct after the current transform is applied but this approach was not correct because finally the pixel is rescaled with the same factors in both directions.
  And sometimes those factors must be different (see bug 1753075).
 - So the idea of this patch is to apply a scale matrix to the current transform just before setting lineWidth and stroking. This scale matrix is computed in order to ensure that after transform, a pixel will have its two thickness greater than 1.
@marco-c marco-c moved this to Closed in PDF.js quality Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
5 participants