DocumentContainer.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737
  1. <template>
  2. <div ref="mainContainer" class="document-container"
  3. :class="{ 'no-select': isHandActive, 'under': (toolMode === 'compare' && compareStatus !== 'finished') || toolMode === 'document' }"
  4. :style="{
  5. width: `calc(100% - ${leftPanelSpace}px - ${rightPanelSpace}px)`,
  6. 'margin-left': `${leftPanelSpace}px`,
  7. 'margin-right': `${rightPanelSpace}px`,
  8. 'margin-top': `${topSpace}px`
  9. }">
  10. <div ref="viewerContainer" class="document"></div>
  11. <PageNavOverlay :style="{ left: `calc(50% + ${leftPanelSpace / 2}px - ${rightPanelSpace / 2}px)` }" />
  12. </div>
  13. <!-- <div id="findbar" class="findbar hidden">
  14. <div id="findbarInputContainer" class="findbarInputContainer">
  15. <div class="input-container">
  16. <input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…">
  17. <div id="findResultsCount" class="toolbarLabel"></div>
  18. </div>
  19. <Button
  20. img="icon-previous-left"
  21. id="findPrevious"
  22. class="toolbarButton disabled"
  23. title="Find the previous occurrence of the phrase"
  24. >
  25. <ArrowPrev />
  26. </Button>
  27. <Button
  28. img="icon-next-right"
  29. id="findNext"
  30. class="toolbarButton disabled"
  31. title="Find the next occurrence of the phrase"
  32. >
  33. <ArrowNext />
  34. </Button>
  35. </div>
  36. </div> -->
  37. <EnterPassword />
  38. <div id="printServiceDialog" class="print-dialog">
  39. <div class="print-container">
  40. <div class="print-title">Preparing document for printing…</div>
  41. <div class="print-progress">
  42. <progress value="0" max="100"></progress>
  43. <span class="relative-progress">0%</span>
  44. </div>
  45. </div>
  46. </div>
  47. <SetPassword />
  48. <LanguageDialog />
  49. <PreventDialog />
  50. <MeasurePop />
  51. <SelectSignTypeDialog />
  52. <SignatureAppearanceDialog />
  53. <SignatureDetailsDialog />
  54. <CertificationViewerDialog />
  55. <DeleteSignatureDialog />
  56. <div v-if="loading && loadingPercent < 100" class="loading-state">{{ $t('loading') }}...</div>
  57. <div v-show="loadingPercent <= 0 && !load && activePanelTab !== 'COMPARISON' && ['compare', 'document'].includes(toolMode)" class="upload-container">
  58. <input id="fileInput" type="file" accept=".pdf" @change="handleUpload" />
  59. <label for="fileInput">{{ $t('upload') }}</label>
  60. </div>
  61. </template>
  62. <script setup>
  63. import { useViewerStore } from '@/stores/modules/viewer'
  64. import { useDocumentStore } from '@/stores/modules/document'
  65. import { computed, onMounted, ref } from 'vue'
  66. import getHashParameters from '@/helpers/getHashParameters'
  67. import core from '@/core'
  68. const { loadDocument, initializeViewer, initConfig, getDocumentViewer } = core
  69. const mainContainer = ref()
  70. const viewerContainer = ref()
  71. const useViewer = useViewerStore()
  72. const useDocument = useDocumentStore()
  73. const isHandActive = computed(() => {
  74. return useViewer.getActiveHand
  75. })
  76. const isLeftPanelOpen = computed(() => useViewer.isElementOpen('leftPanel'))
  77. const leftPanelSpace = computed(() => {
  78. return isLeftPanelOpen.value ? 260 : 0
  79. })
  80. const rightPanelSpace = computed(() => {
  81. return (useViewer.isElementOpen('rightPanel') || useViewer.isElementOpen('pageModePanel') || useViewer.isElementOpen('stampPanel') || useViewer.isElementOpen('linkPanel')) ? 220 : 0
  82. })
  83. const toolMode = computed(() => useViewer.getToolMode)
  84. const compareStatus = computed(() => useViewer.getCompareStatus)
  85. const topSpace = computed(() => {
  86. return ['view', 'document'].includes(useViewer.getToolMode) || (toolMode.value === 'compare' && compareStatus.value !== 'finished') ? 0 : 44
  87. })
  88. const loading = computed(() => useViewer.getUploadLoading && useViewer.getUpload)
  89. const activePanelTab = computed(() => useViewer.getActiveElementTab('leftPanelTab'))
  90. const load = computed(() => useViewer.getUpload)
  91. async function handleUpload(evt) {
  92. const file = evt.target.files[0];
  93. if (!file) return
  94. if (isLeftPanelOpen.value) {
  95. core.toggleSidebar()
  96. }
  97. useViewer.$patch({
  98. fullMode: false,
  99. currentPage: 0,
  100. scale: '',
  101. themeMode: 'Light',
  102. pageMode: 0,
  103. scrollMode: 'Vertical',
  104. activeTab: 0,
  105. searchStatus: false,
  106. activeElements: {
  107. leftPanel: false,
  108. rightPanel: false
  109. },
  110. activeElementsTab: {
  111. leftPanelTab: 'THUMBS',
  112. rightPanelTab: 'GENERAL'
  113. }
  114. })
  115. useDocument.resetSetting()
  116. core.clearSearchResults()
  117. useDocument.setToolState('')
  118. useViewer.setActiceToolMode('view')
  119. useViewer.setUploadLoading(true)
  120. let filename = file.name
  121. useViewer.setUpload(true)
  122. let url = URL.createObjectURL(file);
  123. await handlePdf(url, filename)
  124. useViewer.setUploadLoading(false)
  125. }
  126. const loadingPercent = computed(() => useDocument.getLoadingProgress)
  127. async function handlePdf(pdf, filename = null) {
  128. const options = {
  129. extension: getHashParameters('extension', null),
  130. filename: getHashParameters('filename', null) || filename,
  131. externalPath: getHashParameters('p', ''),
  132. documentId: getHashParameters('did', null),
  133. progress: useDocument.setLoadingProgress,
  134. pageChangedCallback: useViewer.setCurrentPage,
  135. scaleChangedCallback: useViewer.setCurrentScale,
  136. annotationsNumChangedCallback: useDocument.setAnnotationsCount,
  137. distanceChangedCallback: useDocument.setDistance
  138. }
  139. try {
  140. const { pwd } = await loadDocument(pdf, options)
  141. useDocument.setFileHasPwd(pwd)
  142. useDocument.setCurrentPdfData(pdf, options)
  143. useDocument.setOutline(core.getOutlines())
  144. const toolModeChanged = (mode) => {
  145. if (mode === toolMode.value) return
  146. useViewer.setActiceToolMode(mode)
  147. }
  148. core.addEvent('toolModeChanged', toolModeChanged)
  149. } catch (error) {
  150. console.log(error)
  151. if (error === 'invalid_file_error' || error === 'no_password_given' || error === 'incorrect_password') {
  152. useViewer.setUpload(false)
  153. useViewer.resetSetting()
  154. const openFileInput = document.getElementById("fileInput")
  155. openFileInput.value = ''
  156. useDocument.setCurrentPdfData()
  157. return
  158. }
  159. }
  160. const totalPages = core.getPagesCount()
  161. const scale = core.getScale()
  162. useDocument.setTotalPages(totalPages)
  163. useViewer.setCurrentPage(1)
  164. useViewer.setCurrentScale(scale)
  165. }
  166. onMounted(async () => {
  167. const res = await initConfig({
  168. // license: 'NjVlZmJmYTg3NTA1Yw=='
  169. // license: 'QSy1pbS2oS2Szj1i6oVBY3ZN6fMyhn6rqBLWIBNnez4='
  170. // license: 'pB3xWyaCvnrPR/fDkBPjh+E1LeA0e+bEj6Z7a5VI1tQ='
  171. // license: 'e+L5dBrcDnQJXP98kF7oHEo11SLrWIWse5oWqj5ykMU='
  172. license: 'qMP0vqPQwaQRzgpdsgT8XjiXImmg3wewcg4ZdhADT9+PImvelornERhjuXFmSm1u6vulW5hSW2Yl8JbNZVPfKYkWjYNnsFPdbF08Ki2XFXECyd+ioqSmR6QgXTzvjvsnYHAgHWlW1qaV3grt65gN3RTCPe32s3IAmZNyaXNJsFS6TbpO5Fz4Kha+hIC/0QKIY5f736R9Do368GJi1wsFtx3fpVqFSq1tE3/tEhm43GEom+y1Ea5sH8DJxSLa3uHndmmzPCDWhXNg+04zcDd7pRsFx/8QFm/IqOAp/SezG1QeZ3gZ2+CRt43iBqfeevPMbi3qtoX8IuN5HEOVGIDO6q8kD+Q9C95FZo3W7DLPF5IZWiBPIsFBXW6GG9jIMlEFWe5rnWo7I9ujPHSweIzq22orZsVxD5tPPZ5v7nNW86LvpYVrsZA1ZWyQ08PB4C5RojNrlBK+2jwgC76todX8+OMMXi5FZaHOhVK4mdgXvNKoU3I/BJTvpGOfrVXKJOP5Rm9A3ki7tGs3KS1+TcPxP+7hkxw+qkcPbbYUUZGSaFhWNmeZ8AxazlM2vWnAKDfxyB3zkYt10OmuUj4xx8hkvV5adbfllpJjvdp0DBYyOc6+K0TBVof+phlwhjszWrdm3QIveURmbR763QUBTybPikNm7rh2AHOlZwPY0qWudzuJdXp7Ua4M8Hk2hIUl5hSAyi0KfwVzaj4qZFJz98c3GhGqSEkBoRJBWuxkclY+4WlEQ+GYDjWpAryku2gWr457'
  173. })
  174. const options = {}
  175. const webviewerMode = !!(options && options.webviewerServer) ? options.webviewerServer : 'Standalone'
  176. useViewer.setWebviewerMode(webviewerMode)
  177. if (!res) return
  178. useViewer.setVierified(res)
  179. useViewer.setLicense(getDocumentViewer()._license)
  180. const thumbnailView = document.querySelector('.thumbnail-view')
  181. const annotationView = document.querySelector('.annotation-view')
  182. const outlineView = document.querySelector('.outline-view')
  183. const findbarView = document.querySelector('.findbar-view')
  184. initializeViewer({
  185. container: mainContainer.value,
  186. viewer: viewerContainer.value,
  187. thumbnailView,
  188. outlineView,
  189. annotationView,
  190. findbarView,
  191. toggleButton: document.querySelector('.toggle-button')
  192. })
  193. let initialDoc = getHashParameters('d', '')
  194. initialDoc = initialDoc ? JSON.parse(initialDoc) : './example/PDF Tech Admin Console Guidelines.pdf'
  195. initialDoc = Array.isArray(initialDoc) ? initialDoc : [initialDoc]
  196. const activeTab = useViewer.activeTab || 0
  197. initialDoc = initialDoc[activeTab]
  198. if (initialDoc) {
  199. useViewer.setUpload(true)
  200. useViewer.setUploadLoading(true)
  201. await handlePdf(initialDoc)
  202. useViewer.setUploadLoading(false)
  203. } else {
  204. useViewer.setUpload(false)
  205. }
  206. core.addEvent('onPagesUpdated', () => {
  207. useDocument.setOutline(core.getOutlines())
  208. const totalPages = core.getPagesCount()
  209. const scale = core.getScale()
  210. useDocument.setTotalPages(totalPages)
  211. useViewer.setCurrentPage(1)
  212. useViewer.setCurrentScale(scale)
  213. const scrollMode = useViewer.getScrollMode
  214. const pageMode = useViewer.getPageMode
  215. const modeNum = scrollMode === 'Vertical' ? 0 : 1
  216. core.switchScrollMode(modeNum)
  217. core.switchSpreadMode(pageMode)
  218. })
  219. })
  220. </script>
  221. <style lang="scss">
  222. .grab-to-pan-grab {
  223. cursor: grab !important;
  224. }
  225. .grab-to-pan-grabbing {
  226. cursor: grabbing !important;
  227. position: fixed;
  228. background: rgba(0, 0, 0, 0);
  229. display: block;
  230. top: 0;
  231. left: 0;
  232. right: 0;
  233. bottom: 0;
  234. overflow: hidden;
  235. z-index: 50000;
  236. }
  237. .document-container {
  238. overflow: auto;
  239. position: absolute;
  240. top: 44px;
  241. right: 0;
  242. bottom: 0;
  243. left: 0;
  244. outline: none;
  245. transition: all .3s ease-in-out;
  246. }
  247. .no-select {
  248. .textLayer span {
  249. user-select: none;
  250. -webkit-user-select: none;
  251. }
  252. .annotationContainer>div .freetext {
  253. pointer-events: none;
  254. }
  255. }
  256. .under {
  257. z-index: -1;
  258. opacity: 0;
  259. pointer-events: none;
  260. }
  261. .loading-state {
  262. position: fixed;
  263. left: 50%;
  264. top: 50%;
  265. transform: translate(-50%, -50%);
  266. font-size: 46px;
  267. z-index: 2;
  268. }
  269. .upload-container {
  270. position: absolute;
  271. top: 44px;
  272. right: 0;
  273. bottom: 0;
  274. left: 0;
  275. z-index: 1;
  276. display: flex;
  277. justify-content: center;
  278. align-items: center;
  279. width: 100%;
  280. height: calc(100vh - 44px);
  281. input {
  282. display: none;
  283. }
  284. label {
  285. display: inline-block;
  286. background-color: #0097FF;
  287. width: 260px;
  288. height: 48px;
  289. font-size: 24px;
  290. line-height: 48px;
  291. text-align: center;
  292. color: #FFFFFF;
  293. }
  294. }
  295. .annotationLayer {
  296. background: transparent;
  297. position: absolute;
  298. top: 0;
  299. left: 0;
  300. -webkit-transform-origin: 0 0;
  301. transform-origin: 0 0;
  302. cursor: auto;
  303. z-index: 2;
  304. }
  305. .annotationLayer svg {
  306. display: block;
  307. pointer-events: auto;
  308. }
  309. .inkEditor .inkEditorCanvas {
  310. position: absolute;
  311. top: 0;
  312. left: 0;
  313. width: 100%;
  314. height: 100%;
  315. touch-action: none;
  316. }
  317. .inkEditor {
  318. position: absolute;
  319. background: transparent;
  320. border-radius: 3px;
  321. overflow: auto;
  322. width: 100%;
  323. height: 100%;
  324. z-index: 1;
  325. -webkit-transform-origin: 0 0;
  326. transform-origin: 0 0;
  327. cursor: auto;
  328. }
  329. .inkEditor.selectedAnnotation {
  330. outline: solid 2px rgb(71, 126, 222);
  331. }
  332. .stickyAnnotation,
  333. .editor-container {
  334. position: absolute;
  335. pointer-events: auto;
  336. }
  337. .stickyAnnotation {
  338. outline: none;
  339. font-size: 0;
  340. border: 1px solid transparent;
  341. }
  342. .selectedAnnotation {
  343. border-color: rgb(71, 126, 222);
  344. }
  345. .editor-container {
  346. transform: translateX(-50%);
  347. width: 300px;
  348. height: 247px;
  349. padding: 6px;
  350. z-index: 1;
  351. box-sizing: border-box;
  352. background-color: rgb(255, 245, 203);
  353. box-shadow: rgb(0, 0, 0, 10%) 0px -2px 12px 2px;
  354. border-radius: 5px;
  355. border: none;
  356. outline: none;
  357. font-size: 12px;
  358. color: rgb(51, 51, 51);
  359. line-height: 17px;
  360. resize: none;
  361. text-align: left;
  362. }
  363. .print-dialog {
  364. display: none;
  365. position: fixed;
  366. top: 0;
  367. bottom: 0;
  368. left: 0;
  369. right: 0;
  370. z-index: 100;
  371. background-color: rgba(0, 0, 0, 0.2);
  372. &.show {
  373. display: block;
  374. }
  375. .print-container {
  376. position: absolute;
  377. top: 50%;
  378. left: 50%;
  379. transform: translate(-50%, -50%);
  380. width: 100%;
  381. max-width: 254px;
  382. padding: 15px;
  383. border-spacing: 4px;
  384. color: #000;
  385. font-size: 12px;
  386. line-height: 14px;
  387. background-color: #FFF;
  388. border: 1px solid rgba(0, 0, 0, 0.5);
  389. border-radius: 4px;
  390. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  391. }
  392. .print-title {
  393. margin-bottom: 20px;
  394. }
  395. .print-progress .relative-progress {
  396. margin-left: 10px;
  397. }
  398. }
  399. @media screen and (max-width: 640px) {
  400. .document-container {
  401. width: 100%;
  402. }
  403. }
  404. @media screen and (min-width: 641px) {
  405. .document-container {
  406. width: calc(100% - 260px);
  407. margin-left: 260px;
  408. }
  409. }
  410. .document .page {
  411. position: relative;
  412. margin: 20px auto;
  413. background-clip: content-box;
  414. background-color: rgba(255, 255, 255, 1);
  415. >.freetext {
  416. position: absolute;
  417. z-index: 5;
  418. pointer-events: auto;
  419. outline: none;
  420. }
  421. .text-title {
  422. padding: 8px 0 5px;
  423. font-weight: bold;
  424. font-size: 14px;
  425. line-height: 16px;
  426. color: #333333;
  427. }
  428. &.text svg {
  429. cursor: text !important;
  430. }
  431. .text-container .text-selection {
  432. position: absolute;
  433. z-index: 122;
  434. cursor: text;
  435. background-color: rgba(0, 0, 255, 0.25);
  436. }
  437. }
  438. .document.scrollHorizontal,
  439. .spread {
  440. white-space: nowrap;
  441. text-align: center;
  442. .spread,
  443. .page {
  444. display: inline-block;
  445. margin: 20px;
  446. vertical-align: middle;
  447. }
  448. }
  449. .pdfPresentationMode .page {
  450. margin: 2px;
  451. display: inline-block;
  452. vertical-align: middle;
  453. }
  454. .document.scrollHorizontal .spread {
  455. margin: 0px;
  456. }
  457. .document {
  458. &.annotation-edit .textLayer {
  459. pointer-events: none;
  460. }
  461. .canvasWrapper {
  462. position: absolute;
  463. pointer-events: none;
  464. overflow: hidden;
  465. width: 100%;
  466. height: 100%;
  467. z-index: 1;
  468. }
  469. .page canvas {
  470. width: 100%;
  471. height: 100%;
  472. }
  473. .page.loadingIcon:after {
  474. position: absolute;
  475. top: 0;
  476. left: 0;
  477. content: "";
  478. width: 100%;
  479. height: 100%;
  480. background: url('/images/loading-icon.gif') center no-repeat;
  481. display: none;
  482. transition-property: display;
  483. transition-delay: 400ms;
  484. z-index: 5;
  485. contain: strict;
  486. }
  487. .page.loading:after {
  488. display: block;
  489. }
  490. }
  491. .textLayer {
  492. position: absolute;
  493. text-align: initial;
  494. pointer-events: none;
  495. left: 0;
  496. top: 0;
  497. right: 0;
  498. bottom: 0;
  499. overflow: hidden;
  500. line-height: 1;
  501. -webkit-text-size-adjust: none;
  502. -moz-text-size-adjust: none;
  503. -ms-text-size-adjust: none;
  504. text-size-adjust: none;
  505. forced-color-adjust: none;
  506. line-height: 1;
  507. transform-origin: 0 0;
  508. z-index: 3;
  509. & ::selection {
  510. background-color: rgba(0, 0, 255, 0.25);
  511. }
  512. .blank::selection {
  513. background-color: transparent;
  514. }
  515. }
  516. [data-main-rotation="90"] {
  517. transform: rotate(90deg) translateY(-100%);
  518. }
  519. .textLayer .markedContent {
  520. top: 0;
  521. height: 0;
  522. }
  523. .textLayer br {
  524. display: none;
  525. }
  526. .textLayer span {
  527. color: transparent;
  528. position: absolute;
  529. white-space: pre;
  530. pointer-events: none;
  531. cursor: text;
  532. -webkit-transform-origin: 0% 0%;
  533. transform-origin: 0% 0%;
  534. }
  535. .searchContainer {
  536. position: absolute;
  537. top: 0;
  538. left: 0;
  539. z-index: 3;
  540. pointer-events: none;
  541. }
  542. .searchContainer .highlight {
  543. position: absolute;
  544. background-color: rgba(255, 255, 0, 0.25);
  545. }
  546. .searchContainer .selected .highlight {
  547. background-color: rgba(255, 255, 0, 0.7);
  548. }
  549. .findbar {
  550. padding: 8px;
  551. background-color: var(--c-findbar-bg);
  552. &.hidden {
  553. display: none;
  554. }
  555. .findbarInputContainer {
  556. display: flex;
  557. align-items: center;
  558. }
  559. .input-container {
  560. flex-grow: 1;
  561. display: flex;
  562. width: 180px;
  563. margin: 3px 0;
  564. padding: 0 8px;
  565. border-radius: 1px;
  566. border: 1px solid var(--c-findbar-input-border);
  567. background-color: var(--c-findbar-input-bg);
  568. }
  569. input {
  570. flex-grow: 1;
  571. width: 0;
  572. height: 30px;
  573. outline: none;
  574. padding: 5px 8px;
  575. box-shadow: none;
  576. border: none;
  577. background-color: var(--c-findbar-input-bg);
  578. color: var(--c-findbar-text);
  579. }
  580. .toolbarLabel {
  581. font-size: 14px;
  582. line-height: 30px;
  583. color: var(--c-findbar-text);
  584. white-space: nowrap;
  585. }
  586. .button {
  587. margin-left: 8px;
  588. padding: 0;
  589. color: var(--c-findbar-text);
  590. }
  591. }
  592. .contentContainer {
  593. position: absolute;
  594. left: 0;
  595. top: 0;
  596. right: 0;
  597. bottom: 0;
  598. overflow: hidden;
  599. line-height: 1;
  600. -webkit-text-size-adjust: none;
  601. -moz-text-size-adjust: none;
  602. -ms-text-size-adjust: none;
  603. text-size-adjust: none;
  604. forced-color-adjust: none;
  605. line-height: 1;
  606. transform-origin: 0 0;
  607. z-index: 6;
  608. .cursor-animation {
  609. animation: caretanimation 1.2s steps(2, jump-none) 0s infinite normal both running;
  610. }
  611. .frame-container {
  612. .text-container,
  613. .image-container {
  614. border-style: dashed;
  615. }
  616. .text-container textarea {
  617. cursor: default;
  618. }
  619. &.selected {
  620. z-index: 2;
  621. }
  622. &.editing {
  623. .text-container,
  624. .image-container {
  625. border-style: solid;
  626. z-index: 1;
  627. }
  628. .text-container textarea {
  629. cursor: text;
  630. }
  631. }
  632. }
  633. }
  634. .document-container.pdfPresentationMode .contentContainer {
  635. display: none !important;
  636. }
  637. .document-container.pdfPresentationMode {
  638. top: 0;
  639. background-color: rgb(0 0 0);
  640. width: 100%;
  641. height: 100%;
  642. overflow: hidden;
  643. cursor: none;
  644. user-select: none;
  645. }
  646. .document .dummyPage {
  647. position: relative;
  648. width: 0;
  649. height: 100vh;
  650. display: inline-block;
  651. vertical-align: middle;
  652. }
  653. @keyframes caretanimation {
  654. 0% {
  655. color: #000;
  656. }
  657. 100% {
  658. color: transparent;
  659. }
  660. }
  661. </style>