issue: PDF download from notes list does not apply dark mode styling #6736

Closed
opened 2025-11-11 17:04:33 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @zolgear on GitHub (Oct 23, 2025).

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.34

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04.3

Browser (if applicable)

Chrome 141.0

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

refs: v0.6.33 Release Note

📄 Note PDF exports now include titles and properly render in dark mode with appropriate background colors. Commit

With v0.6.33, PDF downloads work correctly in dark mode as well—thank you!

However, I noticed that if you download a note directly from the list, without opening it, dark mode detection does not occur, so the generated PDF still has a white background with gray text as before.
I wanted to report this.

Actual Behavior

When downloading a PDF from the notes list (notes/Notes.svelte) via downloadPdf, the text appears gray in dark theme mode.

Steps to Reproduce

  1. Open the notes list (notes/Notes.svelte).
  2. Ensure the application is in dark mode.
  3. Without opening a note, click the PDF download menu button (downloadPdf) for any note.
  4. Open the downloaded PDF and check the text color and background.

Logs & Screenshots

Additional Information

No response

Originally created by @zolgear on GitHub (Oct 23, 2025). ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.34 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04.3 ### Browser (if applicable) Chrome 141.0 ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior refs: **v0.6.33 Release Note** > 📄 Note PDF exports now include titles and properly render in dark mode with appropriate background colors. [Commit](https://github.com/open-webui/open-webui/commit/216fb5c3db1a223ffe6e72d97aa9551fe0e2d028) With v0.6.33, PDF downloads work correctly in dark mode as well—thank you! However, I noticed that if you download a note directly from the list, without opening it, dark mode detection does not occur, so the generated PDF still has a white background with gray text as before. I wanted to report this. ### Actual Behavior When downloading a PDF from the notes list (notes/Notes.svelte) via downloadPdf, the text appears gray in dark theme mode. ### Steps to Reproduce 1. Open the notes list (`notes/Notes.svelte`). 2. Ensure the application is in dark mode. 3. Without opening a note, click the PDF download menu button (`downloadPdf`) for any note. 4. Open the downloaded PDF and check the text color and background. ### Logs & Screenshots - ### Additional Information _No response_
GiteaMirror added the bug label 2025-11-11 17:04:33 -06:00
Author
Owner

@silentoplayz commented on GitHub (Oct 23, 2025):

I confirm this issue and have verified that I am able to reproduce it on the dev branch, using the latest commit.

When downloading a PDF from the notes list (notes/Notes.svelte) via downloadPdf, the text appears gray in dark theme mode

I noticed that if you download a note directly from the list, without opening it, dark mode detection does not occur, so the generated PDF still has a white background with gray text as before.

I've also noticed that the note's title is missing from the downloaded .PDF file of the note with your reproduction steps.

Image

The following error is thrown TWICE in the browser console using Mozilla Firefox for Snap on Ubuntu 24.0.4 LTS when I click on the PDF document (.pdf) button via the reproduction steps provided:

#1 0ms Starting document clone with size 1024x1400 scrolled to 0,0 BNVeY_Dn.js:9:38548
#1 10ms Unable to access cssRules property DOMException: CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet
    createStyleClone html2canvas-pro.esm.js:6165
    createElementClone html2canvas-pro.esm.js:6140
    cloneNode html2canvas-pro.esm.js:6281
    appendChildNode html2canvas-pro.esm.js:6254
    cloneChildNodes html2canvas-pro.esm.js:6268
    cloneNode html2canvas-pro.esm.js:6298
    appendChildNode html2canvas-pro.esm.js:6254
    cloneChildNodes html2canvas-pro.esm.js:6268
    cloneNode html2canvas-pro.esm.js:6298
    e html2canvas-pro.esm.js:6060
    Q html2canvas-pro.esm.js:8708
    i html2canvas-pro.esm.js:80
    a html2canvas-pro.esm.js:61
    eA html2canvas-pro.esm.js:54
    eA html2canvas-pro.esm.js:50
    $Q html2canvas-pro.esm.js:8666
    eg html2canvas-pro.esm.js:8661
    V Notes.svelte:161
    E Notes.svelte:133
    v Notes.svelte:403
    X Notes.svelte:443
    X NoteMenu.svelte:85
    Immutable 2
    Ao events.js:8
    we event.js:43
    ye event.js:48
    co event.js:25
    co event.js:25
    action create.js:300
    m menu-item.svelte:38
    m menu-item.svelte:23
    m menu-item.svelte:19
    ne Immutable
    m NoteMenu.svelte:88
    m menu-sub-content.svelte:65
    p menu-sub-content.svelte:103
    Immutable 5
    onOpenChange menu-sub.svelte:15
    n overridable.js:9
    s Immutable
    n overridable.js:5
    qn/dn/action/$</< create.js:804
    setTimeout handler*qn/dn/action/$< create.js:803
    s event.js:23
    ye event.js:51
    co event.js:25
    co event.js:25
    action create.js:789
    m menu-sub-trigger.svelte:44
    m menu-sub-trigger.svelte:28
    ne Immutable
    m NoteMenu.svelte:61
    m menu-sub.svelte:28
    ne Immutable
    m NoteMenu.svelte:93
    m menu-content.svelte:65
    p menu-content.svelte:97
    Immutable 5
    re NoteMenu.svelte:33
    o NoteMenu.svelte:44
    ctx Immutable
    onOpenChange menu.svelte:37
    n overridable.js:9
    s Immutable
    n overridable.js:5
    At create.js:1034
    destroy create.js:199
    s event.js:23
    ye event.js:51
    co event.js:25
<anonymous code>:1:147461

In contrast, if I click on the note and THEN download it as a PDF, the PDF file downloaded looks to be what is expected.

Image Image
@silentoplayz commented on GitHub (Oct 23, 2025): I confirm this issue and have verified that I am able to reproduce it on the `dev` branch, using the latest commit. > When downloading a PDF from the notes list (notes/Notes.svelte) via downloadPdf, the text appears gray in dark theme mode > I noticed that if you download a note directly from the list, without opening it, dark mode detection does not occur, so the generated PDF still has a white background with gray text as before. I've also noticed that the note's title is missing from the downloaded .PDF file of the note with your reproduction steps. <img width="2558" height="1279" alt="Image" src="https://github.com/user-attachments/assets/7294396f-bc43-4ec9-beed-c3320de9f357" /> The following error is thrown **TWICE** in the browser console using Mozilla Firefox for Snap on Ubuntu 24.0.4 LTS when I click on the `PDF document (.pdf)` button via the reproduction steps provided: ```js #1 0ms Starting document clone with size 1024x1400 scrolled to 0,0 BNVeY_Dn.js:9:38548 #1 10ms Unable to access cssRules property DOMException: CSSStyleSheet.cssRules getter: Not allowed to access cross-origin stylesheet createStyleClone html2canvas-pro.esm.js:6165 createElementClone html2canvas-pro.esm.js:6140 cloneNode html2canvas-pro.esm.js:6281 appendChildNode html2canvas-pro.esm.js:6254 cloneChildNodes html2canvas-pro.esm.js:6268 cloneNode html2canvas-pro.esm.js:6298 appendChildNode html2canvas-pro.esm.js:6254 cloneChildNodes html2canvas-pro.esm.js:6268 cloneNode html2canvas-pro.esm.js:6298 e html2canvas-pro.esm.js:6060 Q html2canvas-pro.esm.js:8708 i html2canvas-pro.esm.js:80 a html2canvas-pro.esm.js:61 eA html2canvas-pro.esm.js:54 eA html2canvas-pro.esm.js:50 $Q html2canvas-pro.esm.js:8666 eg html2canvas-pro.esm.js:8661 V Notes.svelte:161 E Notes.svelte:133 v Notes.svelte:403 X Notes.svelte:443 X NoteMenu.svelte:85 Immutable 2 Ao events.js:8 we event.js:43 ye event.js:48 co event.js:25 co event.js:25 action create.js:300 m menu-item.svelte:38 m menu-item.svelte:23 m menu-item.svelte:19 ne Immutable m NoteMenu.svelte:88 m menu-sub-content.svelte:65 p menu-sub-content.svelte:103 Immutable 5 onOpenChange menu-sub.svelte:15 n overridable.js:9 s Immutable n overridable.js:5 qn/dn/action/$</< create.js:804 setTimeout handler*qn/dn/action/$< create.js:803 s event.js:23 ye event.js:51 co event.js:25 co event.js:25 action create.js:789 m menu-sub-trigger.svelte:44 m menu-sub-trigger.svelte:28 ne Immutable m NoteMenu.svelte:61 m menu-sub.svelte:28 ne Immutable m NoteMenu.svelte:93 m menu-content.svelte:65 p menu-content.svelte:97 Immutable 5 re NoteMenu.svelte:33 o NoteMenu.svelte:44 ctx Immutable onOpenChange menu.svelte:37 n overridable.js:9 s Immutable n overridable.js:5 At create.js:1034 destroy create.js:199 s event.js:23 ye event.js:51 co event.js:25 <anonymous code>:1:147461 ``` In contrast, if I click on the note and **THEN** download it as a PDF, the PDF file downloaded looks to be what is expected. <img width="386" height="178" alt="Image" src="https://github.com/user-attachments/assets/1c088db0-1bdf-4915-885e-e1103f1d3f54" /> <img width="2557" height="1274" alt="Image" src="https://github.com/user-attachments/assets/4ef3b630-cb02-4226-a40b-9346a5697be6" />
Author
Owner

@acomarcho commented on GitHub (Oct 31, 2025):

Hi, I tried to create a fix for this. I attached a screen recording of the fix in the PR. Thank you!

@acomarcho commented on GitHub (Oct 31, 2025): Hi, I tried to create a fix for this. I attached a screen recording of the fix [in the PR](https://github.com/open-webui/open-webui/pull/18757). Thank you!
Author
Owner

@tjbck commented on GitHub (Nov 3, 2025):

Addressed in dev!

@tjbck commented on GitHub (Nov 3, 2025): Addressed in dev!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#6736