Replies: 2 comments
-
Without changing canvasBackground? I don't think that would be possible. Canvas works similarly to an image. White background won't magically become opaque. That's why canvasBackground prop exists. :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
it is also interesting how to do it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Before you start - checklist
Description
Hi I'm trying to change a page background color the parent node of canvas. It is div that class name is "react-df__Page" in dev tools.
I've tried two ways for changing the background color
modifying css attribute in index.css like below
.react-pdf__Page { background-color: antiquewhite; }
attempting tailwind css style with modifying className attribute of Page component
<Page pageIndex={i} className="flex flex-col items-center bg-[#f4f5fa] dark:bg-slate-800" renderTextLayer={false} renderAnnotationLayer={false} key={
page_${i + 1}} />
I tried both methods, but neither of them resolved the issue. How can I change the background color? I want change that white spaces below like other navy color sides
" not changing canvasBackground itself "
" without using !important "
Steps to reproduce
try to change style
Expected behavior
backgorund color changing
Actual behavior
no response
Additional information
No response
Environment
Beta Was this translation helpful? Give feedback.
All reactions