Skip to content

Commit 87bdc4b

Browse files
Update pdf.js
1 parent 2b00375 commit 87bdc4b

File tree

15 files changed

+658
-449
lines changed

15 files changed

+658
-449
lines changed

build/pdf.js

Lines changed: 207 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/pdf.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/pdf.sandbox.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/pdf.worker.js

Lines changed: 165 additions & 49 deletions
Large diffs are not rendered by default.

build/pdf.worker.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/debugger.css

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/* Copyright 2014 Mozilla Foundation
2+
*
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
#PDFBug {
17+
background-color: rgba(255, 255, 255, 1);
18+
border: 1px solid rgba(102, 102, 102, 1);
19+
position: fixed;
20+
top: 32px;
21+
right: 0;
22+
bottom: 0;
23+
font-size: 10px;
24+
padding: 0;
25+
width: 300px;
26+
}
27+
#PDFBug .controls {
28+
background: rgba(238, 238, 238, 1);
29+
border-bottom: 1px solid rgba(102, 102, 102, 1);
30+
padding: 3px;
31+
}
32+
#PDFBug .panels {
33+
bottom: 0;
34+
left: 0;
35+
overflow: auto;
36+
position: absolute;
37+
right: 0;
38+
top: 27px;
39+
}
40+
#PDFBug .panels > div {
41+
padding: 5px;
42+
}
43+
#PDFBug button.active {
44+
font-weight: bold;
45+
}
46+
.debuggerShowText,
47+
.debuggerHideText:hover {
48+
background-color: rgba(255, 255, 0, 1);
49+
}
50+
#PDFBug .stats {
51+
font-family: courier;
52+
font-size: 10px;
53+
white-space: pre;
54+
}
55+
#PDFBug .stats .title {
56+
font-weight: bold;
57+
}
58+
#PDFBug table {
59+
font-size: 10px;
60+
white-space: pre;
61+
}
62+
#PDFBug table.showText {
63+
border-collapse: collapse;
64+
text-align: center;
65+
}
66+
#PDFBug table.showText,
67+
#PDFBug table.showText tr,
68+
#PDFBug table.showText td {
69+
border: 1px solid black;
70+
padding: 1px;
71+
}
72+
#PDFBug table.showText td.advance {
73+
color: grey;
74+
}
75+
76+
#viewer.textLayer-visible .textLayer {
77+
opacity: 1;
78+
}
79+
80+
#viewer.textLayer-visible .canvasWrapper {
81+
background-color: rgba(128, 255, 128, 1);
82+
}
83+
84+
#viewer.textLayer-visible .canvasWrapper canvas {
85+
mix-blend-mode: screen;
86+
}
87+
88+
#viewer.textLayer-visible .textLayer span {
89+
background-color: rgba(255, 255, 0, 0.1);
90+
color: rgba(0, 0, 0, 1);
91+
border: solid 1px rgba(255, 0, 0, 0.5);
92+
box-sizing: border-box;
93+
}
94+
95+
#viewer.textLayer-hover .textLayer span:hover {
96+
background-color: rgba(255, 255, 255, 1);
97+
color: rgba(0, 0, 0, 1);
98+
}
99+
100+
#viewer.textLayer-shadow .textLayer span {
101+
background-color: rgba(255, 255, 255, 0.6);
102+
color: rgba(0, 0, 0, 1);
103+
}

web/debugger.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ const PDFBug = (function PDFBugClosure() {
531531
}
532532
},
533533
init(pdfjsLib, container, ids) {
534+
this.loadCSS();
534535
this.enable(ids);
535536
/*
536537
* Basic Layout:
@@ -579,6 +580,15 @@ const PDFBug = (function PDFBugClosure() {
579580
}
580581
this.selectPanel(0);
581582
},
583+
loadCSS() {
584+
const { url } = import.meta;
585+
586+
const link = document.createElement("link");
587+
link.rel = "stylesheet";
588+
link.href = url.replace(/.js$/, ".css");
589+
590+
document.head.appendChild(link);
591+
},
582592
cleanup() {
583593
for (const tool of this.tools) {
584594
if (tool.enabled) {

web/locale/be/viewer.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ page_scale_percent={{scale}}%
227227

228228
# Loading indicator messages
229229
loading=Чытаецца…
230-
loading_error=Здарылася памылка падчас загрузкі PDF.
230+
loading_error=Здарылася памылка ў часе загрузкі PDF.
231231
invalid_file_error=Няспраўны або пашкоджаны файл PDF.
232232
missing_file_error=Адсутны файл PDF.
233233
unexpected_response_error=Нечаканы адказ сервера.

web/locale/kab/viewer.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ cursor_text_select_tool_label=Afecku n tefrant n uḍris
6161
cursor_hand_tool.title=Rmed afecku afus
6262
cursor_hand_tool_label=Afecku afus
6363

64+
scroll_page.title=Seqdec adrurem n usebter
65+
scroll_page_label=Adrurem n usebter
6466
scroll_vertical.title=Seqdec adrurem ubdid
6567
scroll_vertical_label=Adrurem ubdid
6668
scroll_horizontal.title=Seqdec adrurem aglawan
@@ -168,6 +170,7 @@ find_next.title=Aff-d timseḍriwt n twinest d-iteddun
168170
find_next_label=Ddu ɣer zdat
169171
find_highlight=Err izirig imaṛṛa
170172
find_match_case_label=Qadeṛ amasal n isekkilen
173+
find_match_diacritics_label=Qadeṛ ifeskilen
171174
find_entire_word_label=Awalen iččuranen
172175
find_reached_top=Yabbeḍ s afella n usebter, tuɣalin s wadda
173176
find_reached_bottom=Tebḍeḍ s adda n usebter, tuɣalin s afella

web/locale/sc/viewer.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,28 @@
1313
# limitations under the License.
1414

1515
# Main toolbar buttons (tooltips and alt text for images)
16+
previous.title=Pàgina anteriore
1617
previous_label=S'ischeda chi b'est primu
18+
next.title=Pàgina imbeniente
1719
next_label=Imbeniente
1820

1921
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
2022
page.title=Pàgina
2123
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
2224
# representing the total number of pages in the document.
25+
of_pages=de {{pagesCount}}
2326
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
2427
# will be replaced by a number representing the currently visible page,
2528
# respectively a number representing the total number of pages in the document.
29+
page_of_pages=({{pageNumber}} de {{pagesCount}})
2630

2731
zoom_out.title=Impitica
2832
zoom_out_label=Impitica
2933
zoom_in.title=Ismànnia
3034
zoom_in_label=Ismànnia
3135
zoom.title=Ismànnia
36+
presentation_mode.title=Cola a sa modalidade de presentatzione
37+
presentation_mode_label=Modalidade de presentatzione
3238
open_file.title=Aberi s'archìviu
3339
open_file_label=Abertu
3440
print.title=Imprenta

0 commit comments

Comments
 (0)