2023/11/21 更新。

3.5.x版本后官方追加主题菜单,有三个默认主题。

本教程可能已失效,请注意辨别

后面有时间的话再更新吧


2023/3/1 更新。

参考:

http://t.csdn.cn/GHhbw(已失效)

Dark Mode for Sumatra PDF – oak.dev

pc电脑pdf反色夜间模式软件SumatraPDF - 晨光曦微 - 博客园 (cnblogs.com)

官方说明文档(注意版本时效性)

备个份,方便以后查看,

⚠不同版本可能会有所不同,请按照选项对照自行修改, 本文的版本:v3.4.6

总体呈现

使用命令直接切换

在菜单栏中打开命令面板,或者使用快捷键Ctrl+k

输入命令Invert Colors,就可以在两种颜色之间切换。

快捷键

英文输入模式下直接按i即可反色

修改默认配置

我们想要达到的预期是默认打开的就是暗黑模式,所以我们打开高级设置:

首先建议保存一份默认配置:

# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-4-6.html
# 上面的链接就是官方说明文档,想仔细了解每个参数意义的可以参考上面的官方文档
FixedPageUI [
    TextColor = #000000
    BackgroundColor = #ffffff
    SelectionColor = #f5fc0c
    WindowMargin = 2 4 2 4
    PageSpacing = 4 4
    HideScrollbars = false
]
ComicBookUI [
    WindowMargin = 0 0 0 0
    PageSpacing = 4 4
    CbxMangaMode = false
]
ChmUI [
    UseFixedPageUI = false
]

SelectionHandlers [
]
ExternalViewers [
]

ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0

PrinterDefaults [
    PrintScale = shrink
]
ForwardSearch [
    HighlightOffset = 0
    HighlightWidth = 15
    HighlightColor = #6581ff
    HighlightPermanent = false
]
Annotations [
    HighlightColor = #ffff00
    UnderlineColor = #00ff00
    TextIconColor = #ffff00
    TextIconType = 
    DefaultAuthor = 
]

RememberOpenedFiles = true
RememberStatePerDocument = true
RestoreSession = true
UiLanguage = cn
EnableTeXEnhancements = false
DefaultDisplayMode = automatic
DefaultZoom = fit page
Shortcuts [
]
EscToExit = false
ReuseInstance = false
ReloadModifiedDocuments = true

MainWindowBackground = #80fff200
FullPathInTitle = false
ShowMenubar = true
ShowToolbar = true
ShowFavorites = false
ShowToc = true
TocDy = 0
SidebarDx = 204
ToolbarSize = 18
TabWidth = 300
TreeFontSize = 0
SmoothScroll = false
ShowStartPage = true
CheckForUpdates = true
WindowState = 1
WindowPos = 543 0 834 1080
UseTabs = true
UseSysColors = false
CustomScreenDPI = 0

FileStates [
    [
        FilePath = 
        Favorites [
        ]
        IsPinned = false
        IsMissing = false
        OpenCount = 1
        UseDefaultState = false
        DisplayMode = continuous
        ScrollPos = -1 336.285
        PageNo = 12
        Zoom = fit page
        Rotation = 0
        WindowState = 1
        WindowPos = 543 0 834 1080
        ShowToc = true
        SidebarDx = 204
        DisplayR2L = false
        ReparseIdx = 0
    ]
]
SessionData [
]
TimeOfLastUpdateCheck = 0 0
OpenCountWeek = 629

# Settings below are not recognized by the current version

然后是个性化设置:(简化版看下文,对照修改)

# For documentation, see https://www.sumatrapdfreader.org/settings/settings3-4-6.html
FixedPageUI [
    TextColor = #d6d6db
    BackgroundColor = #303536
    SelectionColor = #f5fc0c
    WindowMargin = 2 4 2 4
    PageSpacing = 4 4
    HideScrollbars = false
]
ComicBookUI [
    WindowMargin = 0 0 0 0
    PageSpacing = 4 4
    CbxMangaMode = false
]
ChmUI [
    UseFixedPageUI = false
]

SelectionHandlers [
]
ExternalViewers [
]

ZoomLevels = 8.33 12.5 18 25 33.33 50 66.67 75 100 125 150 200 300 400 600 800 1000 1200 1600 2000 2400 3200 4800 6400
ZoomIncrement = 0

PrinterDefaults [
    PrintScale = shrink
]
ForwardSearch [
    HighlightOffset = 0
    HighlightWidth = 15
    HighlightColor = #6581ff
    HighlightPermanent = false
]
Annotations [
    HighlightColor = #ffff00
    UnderlineColor = #00ff00
    TextIconColor = #ffff00
    TextIconType = 
    DefaultAuthor = 
]

RememberOpenedFiles = true
RememberStatePerDocument = true
RestoreSession = false
UiLanguage = cn
EnableTeXEnhancements = true
DefaultDisplayMode = continuous
DefaultZoom = fit width
Shortcuts [
]
EscToExit = false
ReuseInstance = false
ReloadModifiedDocuments = true

MainWindowBackground = #A6A6A6
FullPathInTitle = false
ShowMenubar = true
ShowToolbar = false
ShowFavorites = false
ShowToc = true
TocDy = 0
SidebarDx = 204
ToolbarSize = 18
TabWidth = 60
TreeFontSize = 0
SmoothScroll = true
ShowStartPage = true
CheckForUpdates = false
WindowState = 2
WindowPos = 543 0 834 1080
UseTabs = true
UseSysColors = false
CustomScreenDPI = 0

FileStates [
    [
        FilePath = 
        Favorites [
        ]
        IsPinned = false
        IsMissing = false
        OpenCount = 16
        UseDefaultState = false
        DisplayMode = continuous
        ScrollPos = -1 338.901
        PageNo = 48
        Zoom = fit width
        Rotation = 0
        WindowState = 2
        WindowPos = 543 0 834 1080
        ShowToc = false
        SidebarDx = 204
        DisplayR2L = false
        ReparseIdx = 0
    ]
]
SessionData [
]
TimeOfLastUpdateCheck = 0 0
OpenCountWeek = 629

# Settings below are not recognized by the current version

简化后关键参数:

# 这个参数集就是主题的关键参数,可以自己调试前面两个关键参数找到自己合适的参数
FixedPageUI [
    TextColor = #d6d6db
    BackgroundColor = #242936
    SelectionColor = #f5fc0c
    WindowMargin = 2 4 2 4
    PageSpacing = 4 4
    HideScrollbars = false
]
# 文档历史记录
RememberOpenedFiles = true
# 文档阅读状态记录,建议开启
RememberStatePerDocument = true
# 主页背景
MainWindowBackground = #A6A6A6
# 显示菜单栏
ShowMenubar = true
# 显示工具栏
ShowToolbar = false

主要的就是上面这个简化后的配置,其他配置可以自己摸索,请查找后修改。

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐