How to change the background color of the pdf reader ?

Hello everyone, I’m using the Logseq version (version 0.3.6) and I noticed that the PDF background is not changed when customizing custom.css.
Does anyone know how to change the background of the PDF reader?

2 Likes

In case you still need this, I changed this with the following css (where var(--background) was the colour I wanted). The code is for the dark theme only but can be modified in the obvious way for the other two colours by changing dark to light or warm.

#pdf-layout-container[data-theme=dark] .extensions__pdf-toolbar {
  linear-gradient(0deg,rgba(255,255,255,0) 10%,var(--background) 100%);
}
#pdf-layout-container[data-theme=dark] {
  background-color: var(--background);
}
#pdf-layout-container[data-theme=dark] .textLayer {
  background-color: var(--background);
}
.extensions__pdf-settings-item.theme-picker>button.dark {
    background-color: var(--background);
}

Hello,

I would like to change the background of PDF files.

I tried to use the CSS code above in custom.css, but it didn’t work (by using the code as it is, or by replacing var(–background) with #000000 ).

Does anyone know how to change this ? I would like to use Logseq to study, but the PDF background is problematic for me.

Have a nice day !

I was able to change it after using the Inspector Tool (as explained here) to find the exact CSS elements :

In custom.css :

.extensions__pdf-container[data-theme=dark] .textLayer {
background-color: #23262C;
filter: invert(100%);
}