pdf_viewer.css 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  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. .textLayer {
  16. position: absolute;
  17. text-align: initial;
  18. left: 0;
  19. top: 0;
  20. right: 0;
  21. bottom: 0;
  22. overflow: hidden;
  23. opacity: 0.2;
  24. line-height: 1;
  25. }
  26. .textLayer span,
  27. .textLayer br {
  28. color: transparent;
  29. position: absolute;
  30. white-space: pre;
  31. cursor: text;
  32. transform-origin: 0% 0%;
  33. }
  34. .textLayer .highlight {
  35. margin: -1px;
  36. padding: 1px;
  37. background-color: rgba(180, 0, 170, 1);
  38. border-radius: 4px;
  39. }
  40. .textLayer .highlight.appended {
  41. position: initial;
  42. }
  43. .textLayer .highlight.begin {
  44. border-radius: 4px 0 0 4px;
  45. }
  46. .textLayer .highlight.end {
  47. border-radius: 0 4px 4px 0;
  48. }
  49. .textLayer .highlight.middle {
  50. border-radius: 0;
  51. }
  52. .textLayer .highlight.selected {
  53. background-color: rgba(0, 100, 0, 1);
  54. }
  55. .textLayer ::-moz-selection {
  56. background: rgba(0, 0, 255, 1);
  57. }
  58. .textLayer ::selection {
  59. background: rgba(0, 0, 255, 1);
  60. }
  61. /* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */
  62. .textLayer br::-moz-selection {
  63. background: transparent;
  64. }
  65. .textLayer br::selection {
  66. background: transparent;
  67. }
  68. .textLayer .endOfContent {
  69. display: block;
  70. position: absolute;
  71. left: 0;
  72. top: 100%;
  73. right: 0;
  74. bottom: 0;
  75. z-index: -1;
  76. cursor: default;
  77. -webkit-user-select: none;
  78. -moz-user-select: none;
  79. user-select: none;
  80. }
  81. .textLayer .endOfContent.active {
  82. top: 0;
  83. }
  84. :root {
  85. --annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
  86. }
  87. .annotationLayer section {
  88. position: absolute;
  89. text-align: initial;
  90. }
  91. .annotationLayer .linkAnnotation > a,
  92. .annotationLayer .buttonWidgetAnnotation.pushButton > a {
  93. position: absolute;
  94. font-size: 1em;
  95. top: 0;
  96. left: 0;
  97. width: 100%;
  98. height: 100%;
  99. }
  100. .annotationLayer .linkAnnotation > a:hover,
  101. .annotationLayer .buttonWidgetAnnotation.pushButton > a:hover {
  102. opacity: 0.2;
  103. background: rgba(255, 255, 0, 1);
  104. box-shadow: 0 2px 10px rgba(255, 255, 0, 1);
  105. }
  106. .annotationLayer .textAnnotation img {
  107. position: absolute;
  108. cursor: pointer;
  109. }
  110. .annotationLayer .textWidgetAnnotation input,
  111. .annotationLayer .textWidgetAnnotation textarea,
  112. .annotationLayer .choiceWidgetAnnotation select,
  113. .annotationLayer .buttonWidgetAnnotation.checkBox input,
  114. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  115. background-image: var(--annotation-unfocused-field-background);
  116. border: 1px solid transparent;
  117. box-sizing: border-box;
  118. font-size: 9px;
  119. height: 100%;
  120. margin: 0;
  121. padding: 0 3px;
  122. vertical-align: top;
  123. width: 100%;
  124. }
  125. .annotationLayer .choiceWidgetAnnotation select option {
  126. padding: 0;
  127. }
  128. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  129. border-radius: 50%;
  130. }
  131. .annotationLayer .textWidgetAnnotation textarea {
  132. font: message-box;
  133. font-size: 9px;
  134. resize: none;
  135. }
  136. .annotationLayer .textWidgetAnnotation input[disabled],
  137. .annotationLayer .textWidgetAnnotation textarea[disabled],
  138. .annotationLayer .choiceWidgetAnnotation select[disabled],
  139. .annotationLayer .buttonWidgetAnnotation.checkBox input[disabled],
  140. .annotationLayer .buttonWidgetAnnotation.radioButton input[disabled] {
  141. background: none;
  142. border: 1px solid transparent;
  143. cursor: not-allowed;
  144. }
  145. .annotationLayer .textWidgetAnnotation input:hover,
  146. .annotationLayer .textWidgetAnnotation textarea:hover,
  147. .annotationLayer .choiceWidgetAnnotation select:hover,
  148. .annotationLayer .buttonWidgetAnnotation.checkBox input:hover,
  149. .annotationLayer .buttonWidgetAnnotation.radioButton input:hover {
  150. border: 1px solid rgba(0, 0, 0, 1);
  151. }
  152. .annotationLayer .textWidgetAnnotation input:focus,
  153. .annotationLayer .textWidgetAnnotation textarea:focus,
  154. .annotationLayer .choiceWidgetAnnotation select:focus {
  155. background: none;
  156. border: 1px solid transparent;
  157. }
  158. .annotationLayer .textWidgetAnnotation input :focus,
  159. .annotationLayer .textWidgetAnnotation textarea :focus,
  160. .annotationLayer .choiceWidgetAnnotation select :focus,
  161. .annotationLayer .buttonWidgetAnnotation.checkBox :focus,
  162. .annotationLayer .buttonWidgetAnnotation.radioButton :focus {
  163. background-image: none;
  164. background-color: transparent;
  165. outline: auto;
  166. }
  167. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
  168. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,
  169. .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  170. background-color: rgba(0, 0, 0, 1);
  171. content: "";
  172. display: block;
  173. position: absolute;
  174. }
  175. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,
  176. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  177. height: 80%;
  178. left: 45%;
  179. width: 1px;
  180. }
  181. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before {
  182. transform: rotate(45deg);
  183. }
  184. .annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after {
  185. transform: rotate(-45deg);
  186. }
  187. .annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before {
  188. border-radius: 50%;
  189. height: 50%;
  190. left: 30%;
  191. top: 20%;
  192. width: 50%;
  193. }
  194. .annotationLayer .textWidgetAnnotation input.comb {
  195. font-family: monospace;
  196. padding-left: 2px;
  197. padding-right: 0;
  198. }
  199. .annotationLayer .buttonWidgetAnnotation.checkBox input,
  200. .annotationLayer .buttonWidgetAnnotation.radioButton input {
  201. -webkit-appearance: none;
  202. -moz-appearance: none;
  203. appearance: none;
  204. padding: 0;
  205. }
  206. .annotationLayer .popupWrapper {
  207. position: absolute;
  208. width: 20em;
  209. }
  210. .annotationLayer .popup {
  211. position: absolute;
  212. z-index: 200;
  213. max-width: 20em;
  214. background-color: rgba(255, 255, 153, 1);
  215. box-shadow: 0 2px 5px rgba(136, 136, 136, 1);
  216. border-radius: 2px;
  217. padding: 6px;
  218. margin-left: 5px;
  219. cursor: pointer;
  220. font: message-box;
  221. font-size: 9px;
  222. white-space: normal;
  223. word-wrap: break-word;
  224. }
  225. .annotationLayer .popup > * {
  226. font-size: 9px;
  227. }
  228. .annotationLayer .popup h1 {
  229. display: inline-block;
  230. }
  231. .annotationLayer .popup span {
  232. display: inline-block;
  233. margin-left: 5px;
  234. }
  235. .annotationLayer .popup p {
  236. border-top: 1px solid rgba(51, 51, 51, 1);
  237. margin-top: 2px;
  238. padding-top: 2px;
  239. }
  240. .annotationLayer .highlightAnnotation,
  241. .annotationLayer .underlineAnnotation,
  242. .annotationLayer .squigglyAnnotation,
  243. .annotationLayer .strikeoutAnnotation,
  244. .annotationLayer .freeTextAnnotation,
  245. .annotationLayer .lineAnnotation svg line,
  246. .annotationLayer .squareAnnotation svg rect,
  247. .annotationLayer .circleAnnotation svg ellipse,
  248. .annotationLayer .polylineAnnotation svg polyline,
  249. .annotationLayer .polygonAnnotation svg polygon,
  250. .annotationLayer .caretAnnotation,
  251. .annotationLayer .inkAnnotation svg polyline,
  252. .annotationLayer .stampAnnotation,
  253. .annotationLayer .fileAttachmentAnnotation {
  254. cursor: pointer;
  255. }
  256. :root {
  257. --xfa-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");
  258. }
  259. .xfaLayer .highlight {
  260. margin: -1px;
  261. padding: 1px;
  262. background-color: rgba(239, 203, 237, 1);
  263. border-radius: 4px;
  264. }
  265. .xfaLayer .highlight.appended {
  266. position: initial;
  267. }
  268. .xfaLayer .highlight.begin {
  269. border-radius: 4px 0 0 4px;
  270. }
  271. .xfaLayer .highlight.end {
  272. border-radius: 0 4px 4px 0;
  273. }
  274. .xfaLayer .highlight.middle {
  275. border-radius: 0;
  276. }
  277. .xfaLayer .highlight.selected {
  278. background-color: rgba(203, 223, 203, 1);
  279. }
  280. .xfaLayer ::-moz-selection {
  281. background: rgba(0, 0, 255, 1);
  282. }
  283. .xfaLayer ::selection {
  284. background: rgba(0, 0, 255, 1);
  285. }
  286. .xfaPage {
  287. overflow: hidden;
  288. position: relative;
  289. }
  290. .xfaContentarea {
  291. position: absolute;
  292. }
  293. .xfaPrintOnly {
  294. display: none;
  295. }
  296. .xfaLayer {
  297. position: absolute;
  298. text-align: initial;
  299. top: 0;
  300. left: 0;
  301. transform-origin: 0 0;
  302. line-height: 1.2;
  303. }
  304. .xfaLayer * {
  305. color: inherit;
  306. font: inherit;
  307. font-style: inherit;
  308. font-weight: inherit;
  309. font-kerning: inherit;
  310. letter-spacing: -0.01px;
  311. text-align: inherit;
  312. text-decoration: inherit;
  313. box-sizing: border-box;
  314. background-color: transparent;
  315. padding: 0;
  316. margin: 0;
  317. pointer-events: auto;
  318. line-height: inherit;
  319. }
  320. .xfaLayer div {
  321. pointer-events: none;
  322. }
  323. .xfaLayer svg {
  324. pointer-events: none;
  325. }
  326. .xfaLayer svg * {
  327. pointer-events: none;
  328. }
  329. .xfaLayer a {
  330. color: blue;
  331. }
  332. .xfaRich li {
  333. margin-left: 3em;
  334. }
  335. .xfaFont {
  336. color: black;
  337. font-weight: normal;
  338. font-kerning: none;
  339. font-size: 10px;
  340. font-style: normal;
  341. letter-spacing: 0;
  342. text-decoration: none;
  343. vertical-align: 0;
  344. }
  345. .xfaCaption {
  346. overflow: hidden;
  347. flex: 0 0 auto;
  348. }
  349. .xfaCaptionForCheckButton {
  350. overflow: hidden;
  351. flex: 1 1 auto;
  352. }
  353. .xfaLabel {
  354. height: 100%;
  355. width: 100%;
  356. }
  357. .xfaLeft {
  358. display: flex;
  359. flex-direction: row;
  360. align-items: center;
  361. }
  362. .xfaRight {
  363. display: flex;
  364. flex-direction: row-reverse;
  365. align-items: center;
  366. }
  367. .xfaLeft > .xfaCaption,
  368. .xfaLeft > .xfaCaptionForCheckButton,
  369. .xfaRight > .xfaCaption,
  370. .xfaRight > .xfaCaptionForCheckButton {
  371. max-height: 100%;
  372. }
  373. .xfaTop {
  374. display: flex;
  375. flex-direction: column;
  376. align-items: flex-start;
  377. }
  378. .xfaBottom {
  379. display: flex;
  380. flex-direction: column-reverse;
  381. align-items: flex-start;
  382. }
  383. .xfaTop > .xfaCaption,
  384. .xfaTop > .xfaCaptionForCheckButton,
  385. .xfaBottom > .xfaCaption,
  386. .xfaBottom > .xfaCaptionForCheckButton {
  387. width: 100%;
  388. }
  389. .xfaBorder {
  390. background-color: transparent;
  391. position: absolute;
  392. pointer-events: none;
  393. }
  394. .xfaWrapped {
  395. width: 100%;
  396. height: 100%;
  397. }
  398. .xfaTextfield:focus,
  399. .xfaSelect:focus {
  400. background-image: none;
  401. background-color: transparent;
  402. outline: auto;
  403. outline-offset: -1px;
  404. }
  405. .xfaCheckbox:focus,
  406. .xfaRadio:focus {
  407. outline: auto;
  408. }
  409. .xfaTextfield,
  410. .xfaSelect {
  411. height: 100%;
  412. width: 100%;
  413. flex: 1 1 auto;
  414. border: none;
  415. resize: none;
  416. background-image: var(--xfa-unfocused-field-background);
  417. }
  418. .xfaTop > .xfaTextfield,
  419. .xfaTop > .xfaSelect,
  420. .xfaBottom > .xfaTextfield,
  421. .xfaBottom > .xfaSelect {
  422. flex: 0 1 auto;
  423. }
  424. .xfaButton {
  425. cursor: pointer;
  426. width: 100%;
  427. height: 100%;
  428. border: none;
  429. text-align: center;
  430. }
  431. .xfaLink {
  432. width: 100%;
  433. height: 100%;
  434. }
  435. .xfaCheckbox,
  436. .xfaRadio {
  437. width: 100%;
  438. height: 100%;
  439. flex: 0 0 auto;
  440. border: none;
  441. }
  442. .xfaRich {
  443. white-space: pre-wrap;
  444. width: 100%;
  445. height: 100%;
  446. }
  447. .xfaImage {
  448. -o-object-position: left top;
  449. object-position: left top;
  450. -o-object-fit: contain;
  451. object-fit: contain;
  452. width: 100%;
  453. height: 100%;
  454. }
  455. .xfaLrTb,
  456. .xfaRlTb,
  457. .xfaTb {
  458. display: flex;
  459. flex-direction: column;
  460. align-items: stretch;
  461. }
  462. .xfaLr {
  463. display: flex;
  464. flex-direction: row;
  465. align-items: stretch;
  466. }
  467. .xfaRl {
  468. display: flex;
  469. flex-direction: row-reverse;
  470. align-items: stretch;
  471. }
  472. .xfaTb > div {
  473. justify-content: left;
  474. }
  475. .xfaPosition {
  476. position: relative;
  477. }
  478. .xfaArea {
  479. position: relative;
  480. }
  481. .xfaValignMiddle {
  482. display: flex;
  483. align-items: center;
  484. }
  485. .xfaTable {
  486. display: flex;
  487. flex-direction: column;
  488. align-items: stretch;
  489. }
  490. .xfaTable .xfaRow {
  491. display: flex;
  492. flex-direction: row;
  493. align-items: stretch;
  494. }
  495. .xfaTable .xfaRlRow {
  496. display: flex;
  497. flex-direction: row-reverse;
  498. align-items: stretch;
  499. flex: 1;
  500. }
  501. .xfaTable .xfaRlRow > div {
  502. flex: 1;
  503. }
  504. .xfaNonInteractive input,
  505. .xfaNonInteractive textarea,
  506. .xfaDisabled input,
  507. .xfaDisabled textarea,
  508. .xfaReadOnly input,
  509. .xfaReadOnly textarea {
  510. background: initial;
  511. }
  512. @media print {
  513. .xfaTextfield,
  514. .xfaSelect {
  515. background: transparent;
  516. }
  517. .xfaSelect {
  518. -webkit-appearance: none;
  519. -moz-appearance: none;
  520. appearance: none;
  521. text-indent: 1px;
  522. text-overflow: "";
  523. }
  524. }
  525. :root {
  526. --pdfViewer-padding-bottom: none;
  527. --page-margin: 1px auto -8px;
  528. --page-border: 9px solid transparent;
  529. --spreadHorizontalWrapped-margin-LR: -3.5px;
  530. --zoom-factor: 1;
  531. }
  532. @media screen and (forced-colors: active) {
  533. :root {
  534. --pdfViewer-padding-bottom: 9px;
  535. --page-margin: 9px auto 0;
  536. --page-border: none;
  537. --spreadHorizontalWrapped-margin-LR: 4.5px;
  538. }
  539. }
  540. .pdfViewer {
  541. padding-bottom: var(--pdfViewer-padding-bottom);
  542. }
  543. .pdfViewer .canvasWrapper {
  544. overflow: hidden;
  545. }
  546. .pdfViewer .page {
  547. direction: ltr;
  548. width: 816px;
  549. height: 1056px;
  550. margin: var(--page-margin);
  551. position: relative;
  552. overflow: visible;
  553. border: var(--page-border);
  554. background-clip: content-box;
  555. -o-border-image: url(images/shadow.png) 9 9 repeat;
  556. border-image: url(images/shadow.png) 9 9 repeat;
  557. background-color: rgba(255, 255, 255, 1);
  558. }
  559. .pdfViewer.removePageBorders .page {
  560. margin: 0 auto 10px;
  561. border: none;
  562. }
  563. .pdfViewer.singlePageView {
  564. display: inline-block;
  565. }
  566. .pdfViewer.singlePageView .page {
  567. margin: 0;
  568. border: none;
  569. }
  570. .pdfViewer.scrollHorizontal,
  571. .pdfViewer.scrollWrapped,
  572. .spread {
  573. margin-left: 3.5px;
  574. margin-right: 3.5px;
  575. text-align: center;
  576. }
  577. .pdfViewer.scrollHorizontal,
  578. .spread {
  579. white-space: nowrap;
  580. }
  581. .pdfViewer.removePageBorders,
  582. .pdfViewer.scrollHorizontal .spread,
  583. .pdfViewer.scrollWrapped .spread {
  584. margin-left: 0;
  585. margin-right: 0;
  586. }
  587. .spread .page,
  588. .pdfViewer.scrollHorizontal .page,
  589. .pdfViewer.scrollWrapped .page,
  590. .pdfViewer.scrollHorizontal .spread,
  591. .pdfViewer.scrollWrapped .spread {
  592. display: inline-block;
  593. vertical-align: middle;
  594. }
  595. .spread .page,
  596. .pdfViewer.scrollHorizontal .page,
  597. .pdfViewer.scrollWrapped .page {
  598. margin-left: var(--spreadHorizontalWrapped-margin-LR);
  599. margin-right: var(--spreadHorizontalWrapped-margin-LR);
  600. }
  601. .pdfViewer.removePageBorders .spread .page,
  602. .pdfViewer.removePageBorders.scrollHorizontal .page,
  603. .pdfViewer.removePageBorders.scrollWrapped .page {
  604. margin-left: 5px;
  605. margin-right: 5px;
  606. }
  607. .pdfViewer .page canvas {
  608. margin: 0;
  609. display: block;
  610. }
  611. .pdfViewer .page canvas[hidden] {
  612. display: none;
  613. }
  614. .pdfViewer .page .loadingIcon {
  615. position: absolute;
  616. display: block;
  617. left: 0;
  618. top: 0;
  619. right: 0;
  620. bottom: 0;
  621. background: url("images/loading-icon.gif") center no-repeat;
  622. }
  623. .pdfPresentationMode .pdfViewer {
  624. margin-left: 0;
  625. margin-right: 0;
  626. }
  627. .pdfPresentationMode .pdfViewer .page,
  628. .pdfPresentationMode .pdfViewer .spread {
  629. display: block;
  630. }
  631. .pdfPresentationMode .pdfViewer .page,
  632. .pdfPresentationMode .pdfViewer.removePageBorders .page {
  633. margin-left: auto;
  634. margin-right: auto;
  635. }
  636. .pdfPresentationMode:-webkit-full-screen .pdfViewer .page {
  637. margin-bottom: 100%;
  638. border: 0;
  639. }
  640. .pdfPresentationMode:fullscreen .pdfViewer .page {
  641. margin-bottom: 100%;
  642. border: 0;
  643. }