1. 程式人生 > >Sumatra PDF閱讀器之 Sumatra PDF 高階設定

Sumatra PDF閱讀器之 Sumatra PDF 高階設定

SumatraPDF 是Windows平臺上一款免費閱讀器, 它支援開啟 PDF, ePub, MOBI, XPS, DjVu, CHM, CBZ 和 CBR 格式.

Sumatra PDF 很小並且啟動迅速,支援多國語言(含中文),支援綠色便攜版.安裝版可以安裝外掛,支援瀏覽器和 windows 索引以及預覽功能.

這款軟體我用了很久了,但一直沒有發掘出這個軟體的強大功能, 甚至一直只是把它作為一款小巧快速的 PDF 文件檢視器. 其實對於手機上常見的電子書格式和漫畫書,支援的很不錯.

snipaste20161228_154946

SumatraPDF 設定很簡單,所以讓人忽視了它的定製性,今天我特意把官網的高階配置檔案的介紹翻譯一遍,分享給大家.

通常情況下,我們可以使用選單-> 高階選項… 開啟配置檔案,這是一個簡單的文字檔案,通常儲存在 %APPDATA%\SumatraPDF\SumatraPDF-settings.txt如果是綠色版,則儲存在程式所在資料夾.




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
// 無文件時,視窗的背景色,預設為黃色
MainWindowBackground = #fff200 // 是否允許用 Esc 鍵退出 SumatraPDF
EscToExit = false

// 是否用現有視窗開啟文件
ReuseInstance = false

// 是否使用系統顏色顯示 背景/文字色

UseSysColors = false// 啟動時是否恢復會話
RestoreSession = true

// 自定義 PDF, XPS, DjVu 和 PostScript 的 UI 介面

FixedPageUI [
// 文字色,預設為黑    

    TextColor = #000000
// 背景色,預設為白    

    BackgroundColor = #ffffff
// 選定文字色
    SelectionColor = #f5fc0c

// 文件在視窗中顯示時的上,右,下,左邊距
    WindowMargin = 2424

// 書籍模式雙頁顯示時,水平和垂直間距
    PageSpacing = 44

//梯度漸變色,只支援三種顏色. 實驗性, 也許對繼續閱讀有幫助.

//通常建議為: #2828aa #28aa28 #aa2828
    GradientColors =
]

// 電子書(EPUB, Mobi, FictionBook)的 UI 介面定製選項.

// 若 UseFixedPageUI 為 True 時使用預設配置.
EbookUI [
//字型名稱.重新開啟文件後生效
    FontName = Georgia

//字型大小.重新開啟文件後生效
    FontSize = 12.5

//文字色
    TextColor = #5f4b32

//頁面背景色
    BackgroundColor = #fbf0d9

// 如果為 True, 電子書也將使用 PDF 文件的預設配置(開啟列印和搜尋,禁用自動 reflow)
    UseFixedPageUI = false
]

//漫畫書和圖片的 UI 介面定製選項
ComicBookUI [
// 文件在視窗中顯示時的上,右,下,左邊距
    WindowMargin = 0000

// 書籍模式雙頁顯示時,水平和垂直間距
    PageSpacing = 44

// 如果為 True, 預設顯示漫畫書檔案為漫畫模式 (一次性從右向左顯示2頁)
    CbxMangaMode = false
]

// CHM 檔案定製選項.
ChmUI [
//若為真,介面將使用預設的 PDF 文件風格
    UseFixedPageUI = false
]

//各種檔案型別的附加外部檢視器列表(可以有多個條目格式)
ExternalViewers [
[
//命令列的呼叫外部檢視器,可以用 %p 頁號和 “%1” 檔名(在包含空格的路徑中新增引號)
    CommandLine =

//選單中顯示外部檢視器的名稱
Name =開啟對話方塊的過濾選項,要指定支援的檔案型別,多個專案使用;分割,不要包含任何空格 (比如 *.pdf;*.xps)
Filter =
]
]

//是否顯示選單欄,可以使用 F9 或 ALT
ShowMenubar = true

//檔案更改後是否自動過載 (目前還不支援工作在 ebook UI 模式) (introduced in version 2.5)
ReloadModifiedDocuments = true

//標題欄是否顯示完整路徑 (introduced in version 3.0)
FullPathInTitle = false

//縮放比例的間隔 介於 8.33 和 6400 之間
ZoomLevels = 8.3312.5182533.335066.67751001251502003004006008001000

//縮放比率的步長,如果為0,則使用預設
ZoomIncrement = 0

//設定列印對話方塊的預設選項
PrinterDefaults [
預設值是 scaling (shrink, fit, none)
PrintScale = shrink
]

//自定義顯示搜尋結果 (used from LaTeX editors)
ForwardSearch [

//當設定為正數值時,將向前搜尋高亮樣式改為矩形.在頁面的左邊(從頁邊空白處註明)
    HighlightOffset = 0

//高亮選區的高度 (if HighlightOffset is > 0)
    HighlightWidth = 15

//高亮搜尋的顏色
    HighlightColor = #6581ff

//為真時一直顯示高亮
    HighlightPermanent = false
]

//一個空格分隔的密碼嘗試開啟受密碼保護的檔案時(必須輸入包含空格的密碼時)

//(introduced in version 2.4)
DefaultPasswords =

//自定義主螢幕 DPI

//(如果這個值不是正數,將使用系統的UI設定  (introduced in version 2.5)
CustomScreenDPI = 0

//是否為每個文件儲存顯示配置
RememberStatePerDocument = true

// 當前 UI 的語言, 使用 ISO 碼
UiLanguage =

//是否顯示工具欄
ShowToolbar = true

//是否側欄顯示收藏夾
ShowFavorites = false

// SumatraPDF 關聯的檔案格式副檔名 (e.g. “.pdf .xps .epub”)
AssociatedExtensions =

//是否自動應用副檔名關聯
AssociateSilently = false

// 是否每天檢測一次更新
CheckForUpdates = true

//要忽略更新的版本
VersionToSkip =

//是否記住上次開啟的文件
RememberOpenedFiles = true

//反向搜尋時啟動 LaTeX 編輯器
InverseSearchCmdLine =

//是否增強的 LaTex 反向搜尋
EnableTeXEnhancements = false

//預設的頁面佈局.

//有效值: automatic, single page, facing, book view, 

//continuous, continuous facing, continuous book view
DefaultDisplayMode = automatic

//預設縮放模式 使用比例(in %) 或下述值: fit page, fit width, fit content
DefaultZoom = fit page

//預設視窗狀態. 1 is normal, 2 is maximized, 

//3 is fullscreen, 4 is minimized
WindowState = 1

//預設視窗位置(x,y)和尺寸(寬,高)
WindowPos = 0000

//對於支援解析的文件, 在側欄顯示目錄標籤(書籤)
ShowToc = true

//側欄寬度 favorites/bookmarks
SidebarDx = 0

//如果收藏夾和書籤側邊欄部分可見,這就是書籤的高度(目錄表)部分
TocDy = 0

//是否顯示啟動頁面
ShowStartPage = true

//是否使用標籤模式
UseTabs = true

//開啟檔案的資訊
FileStates [
[
//文件路徑
    FilePath =

//為書籤/收藏夾保留的值
    Favorites [
[
收藏夾在選單中顯示的名稱
Name =

//書籤頁面數值
        PageNo = 0

//頁面標籤
        PageLabel =
]
]

//文件列表專案是否可以使用固定
    IsPinned = false

//文件列表專案是否可以隱藏
    IsMissing = false

//是否記錄文件開啟次數
    OpenCount = 0

//再次開啟加密文件時,是否詢問密碼
    DecryptionKey =

//開啟檔案是否使用通用對話方塊
    UseDefaultState = false

//頁面佈局.

//有效值為: automatic, single page, facing, book view,

//continuous, continuous facing, continuous book view
    DisplayMode = automatic

//文件滾動距離 (in x and y direction)
    ScrollPos = 00

//上次閱讀頁面的編號
    PageNo = 1

//縮放比例或有效值: fit page, fit width, fit content
    Zoom = fit page

//頁面旋轉角度, 90 度遞增
    Rotation = 0

//視窗狀態. 1 is normal, 2 is maximized, 3 is fullscreen, 4 is minimized
    WindowState = 0

//預設位置 (可以任意顯示器)
    WindowPos = 0000

//是否顯示書籤
    ShowToc = true

//側欄寬度
    SidebarDx = 0

//漫畫模式,只限於漫畫書
    DisplayR2L = false

//在電子書UI中恢復上次讀取頁所需的資料
    ReparseIdx = 0

//需要確定表的哪些部分已展開的資料.
    TocState =
]
]

//儲存上次會話,用於崩潰時恢復會話 (introduced in version 3.1)
SessionData [
[
//data required for restoring the view state of a single tab
    TabStates [
[
//path of the document
        FilePath =

//same as FileStates -> DisplayMode
        DisplayMode = automatic

//number of the last read page
        PageNo = 1

//same as FileStates -> Zoom
        Zoom = fit page

//same as FileStates -> Rotation
        Rotation = 0

//how far this document has been scrolled (in x and y direction)
        ScrollPos = 00

//if true, the table of contents was shown when the document was closed
        ShowToc = true

//same as FileStates -> TocState
        TocState =
]
]

//當前選擇的標籤序列 ( 1 為基數)
    TabIndex = 1

//同步 FileState -> WindowState
    WindowState = 0

//預設位置
    WindowPos = 0000

//側欄關閉時的寬度
    SidebarDx = 0
]
]

//自動更新後重載文件的資料請求 (introduced in version 3.0)
ReopenOnce =

//上次更新時間
TimeOfLastUpdateCheck = 00

//在歷史記錄中儲存開啟次數
OpenCountWeek = 0