Forum Discussion

artjomsf's avatar
artjomsf
Frequent Visitor
1 year ago
Solved

Dark Mode Pdf export makes canvas dark bug

Hello everyone, 

I am using Power BI Desktop Version: 2.137.952.0 64-bit (October 2024)

 

I have switched on recent Dark Mode, which specifically states it does not change canvas style. Yet the report canvas does change if I try to export report page as pdf, see screenshots:

How my report page looks like in editing mode:

How my page looks in pdf export:

All fonts etc. remain the same, but background is dark, hence it completely kills the report. Setting different colors of background (e.g., to black) or changing transparancies does not help.

 

And if I try to switch back to Light Mode, I now simply cannot! The dropdown is there, I can select either Legacy, Light, Dark, System default, but when I press OK, nothing changes. It does not work for my exsiting report, nor for new dummy reports I tried to create. 

 

The only workaround I can find now is to take pure white image and put it as background image - then it obviosuly work at the expense of hassle.

 

Is it a bug or I am missing anything? Is there a way to fix it, at least by somehow getting out of dark mode at least?

 

Thanks! 

 

 

  

  • Hi artjomsf,

     

    You should be able to switch back via the interface. I cannot reproduce that issue in the version I am using, 2.137.751.0 64-bit (October 2024). In that version I am able to switch back. 

     

    The Power BI Desktop app stores its settings in an xml file which is within a users.zip file of somebody's local appdata folder of the user profile:

    https://community.fabric.microsoft.com/t5/Desktop/Desktop-Settings/m-p/344631

     

    In my case it was stored in the

    C:\Users\MyUserName\Microsoft\Power BI Desktop Store App\User.zip

     

    The zip contains a folder and settings file

    UserInterface\Settings.xml

     

    You could inspect this file with for example ProcMon, just to see if an error occurs when you try to update the theme (file handle/in use error maybe?).

     

     

    There should be an AppTheme Entry with a sDark value. Light would be sLight.

     

     

    <Entry Type="AppTheme" Value="sDark" />

     

     

     

4 Replies

  • Expiscornovus's avatar
    Expiscornovus
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hi artjomsf,

     

    You should be able to switch back via the interface. I cannot reproduce that issue in the version I am using, 2.137.751.0 64-bit (October 2024). In that version I am able to switch back. 

     

    The Power BI Desktop app stores its settings in an xml file which is within a users.zip file of somebody's local appdata folder of the user profile:

    https://community.fabric.microsoft.com/t5/Desktop/Desktop-Settings/m-p/344631

     

    In my case it was stored in the

    C:\Users\MyUserName\Microsoft\Power BI Desktop Store App\User.zip

     

    The zip contains a folder and settings file

    UserInterface\Settings.xml

     

    You could inspect this file with for example ProcMon, just to see if an error occurs when you try to update the theme (file handle/in use error maybe?).

     

     

    There should be an AppTheme Entry with a sDark value. Light would be sLight.

     

     

    <Entry Type="AppTheme" Value="sDark" />

     

     

     

    • artjomsf's avatar
      artjomsf
      Frequent Visitor

      Many thanks for pointing out to the XML location. I've ended with kust manually altering the value inside to 'sLight' and it did work. Perhaps reinstalling would work, but for quick and dirty soltuion for now that helps.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi artjomsf 

     

    I'm using Power BI Desktop version 2.137.952.0 64-bit (October 2024) which does not reproduce the problem, and I can switch back and forth between different appearances.

    Please try the following steps:
    1. Restart Power BI Desktop to see if the settings take effect.
    2. Uninstall and reinstall Power BI Desktop to see if the problem still occurs.

     

    Furthermore, according to my research, “This setting won't change the report canvas” means that switching to a different appearance won't change the default settings of the canvas. The default setting of the background transparency of the canvas is 100%. So in Dark mode the whole background of the exported PDF background is dark. Adjust the transparency to 0%, the exported PDF background color is consistent with your settings.

    Legacy/ Light mode:

    Dark mode:

     

    Best Regards,
    Jarvis Tang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • artjomsf's avatar
      artjomsf
      Frequent Visitor

      Thank you, this did solve the problem of changin canvas colors. I've misterinterpreted the information on Canvas settings. Still, that means I cannot have partially transparent canvas color with Dark Mode enabled (as it will result with partially transparent canvas overlaying black background and resulting in completely different color that I would imagine). Not sure if it is a bug or feature now, but then I will have to stick to Light Mode.