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

Fixed watermark image appears upside down on iOS/macOS #2411

Open
mas-paw opened this issue Mar 19, 2025 · 1 comment
Open

Fixed watermark image appears upside down on iOS/macOS #2411

mas-paw opened this issue Mar 19, 2025 · 1 comment

Comments

@mas-paw
Copy link

mas-paw commented Mar 19, 2025

When adding a fixed-position watermark in WeasyPrint, the image appears upside down only on iOS/macOS (Preview, Safari). It renders correctly on Windows/Linux (Adobe Reader, Chrome).

for example:

      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: url("{{ MEDIA_URL }}image.png");
      background-repeat: no-repeat;
      background-attachment: fixed;
      background-position: center;
      background-origin: content-box;
      background-size: 80%;
      opacity: 0.09;

when i try to clear exif metadata before generate, its same result. what should i do ?

WeasyPrint version: 62.3
Python version: 3.12.0
iOS/macOS version: 13.x/ 13.x +

The issue may be related to EXIF metadata.
This does not happen when opening the PDF on Windows/Linux.
Tested with different images, same result.

@liZe
Copy link
Member

liZe commented Mar 21, 2025

Hi!

This does not happen when opening the PDF on Windows/Linux.

Unfortunately, Preview is know to have many, many small bugs we have to deal with. It could be useful to report the bug to Apple.

As a workaround, you can try to set the image on the page (with @page) instead of using a dedicate tag, and see if it helps.

when i try to clear exif metadata before generate, its same result. what should i do ?
Tested with different images, same result.

Then it’s probably not related to EXIF.

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