packages.flutter
packages.flutter copied to clipboard
Web rendering ignores background colour
Describe the bug
The default native rendering on MacOS draws a Texture
with a transparent background, which allows me to add a while "paper" at the size of the page. When rendering on Web, the background is always solid white.
I tried to override the color using the backgroundColor
parameter of PdfPageTexture.updateRect()
, but this parameter appears to be ignored by the web renderer.
So this is about two (likely related) issues:
- Rendering on Web does is not by default transparent.
- Rendering on Web ignores the background color passed in
updateRect()
.
Core of my problem is that I would like to render the PDF on Web without a background color.
To Reproduce
NOTE: This applies to rendering directly as a PdfTexture
.
Expected behavior Default rendering to Web should be transparent, just like the MacOS native renderer does.
Screenshots N/A
Smartphone (please complete the following information):
- PDFX version 2.3.0
- pdfjs version 2.12.313
Additional context (None)