Skip to content

Pattern: applying a transform breaks the pattern #17065

Closed

Description

@Dherse

Attach (recommended) or Link to PDF file here: test.pdf

Configuration:

  • Web browser and its version: Firefox 118.0.1 (64-bit)
  • Operating system and its version: Windows 10 22H2 19045.3448
  • PDF.js version: 3.10.86 [c72cb54]
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Open the PDF in Firefox
  2. Compare with a version in Chrome/mupdf

What is the expected behavior? (add screenshot)
It should show four distorted rectangles each with a single contiguous color gradient from red to blue to green to purple (the red part is clipped). The file has been tested in the following viewers: Acrobat, mupdf, evince, XPDF, Chrome, SummatraPDF, and the Apple one and works in all of them.

image

What went wrong? (add screenshot)
For the two rectangles on which a skew & rotation is applied, the pattern does not appear:
image

Hope this is complete, thanks in advance,

Dherse :)

Activity

  1. Snuffleupagus commented on Oct 3, 2023

    @Snuffleupagus
  2. Dherse commented on Oct 3, 2023

    @Dherse
    Author
  3. Snuffleupagus commented on Oct 3, 2023

    @Snuffleupagus
    Collaborator

    @calixteman Any ideas what could be wrong here?

  4. calixteman commented on Oct 3, 2023

    @calixteman
    Contributor

    Yes, it was a bit uneasy to find out what the issue is, but I found out:
    https://github.com/mozilla/pdf.js/blob/master/src/display/canvas.js#L517-L524
    We can't only consider the two opposite points to compute the bounding box.

  5. self-assigned this
    on Oct 3, 2023
  6. added a commit that references this issue on Oct 3, 2023
    6cffca4
  7. Dherse commented on Oct 3, 2023

    @Dherse
    Author

    Wow @calixteman I am blown away, thank you so much!

  8. added a commit that references this issue on Oct 3, 2023
    1be9bbd
  9. added a commit that references this issue on Oct 3, 2023
    0e6d0ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions