Which product are you using?
PDF.js Express Viewer
PDF.js Express Version
UI version | ‘8.7.0’ |
---|---|
Core version | ‘8.7.1’ |
webviewer.min.js | ‘8.7.1’ |
Build | ‘MS8yMC8yMDIzfGIzYTExOTI2Yw==’ |
WebViewer Server | false |
Full API | false |
Detailed description of issue
I want to disable the drop shadow of the pages programatically, therefore I can not hardcode it using CSS.
I tried the following method:
instance.Core.documentViewer.addEventListener('documentLoaded', () => {
const $pages = iframeDoc.querySelectorAll<HTMLElement>('.pageContainer')
$pages.forEach($page => {
$page.style.setProperty('box-shadow', 'none')
$page.style.setProperty('background-color', 'none')
})
but unfortunately this only works on the first page. the other pages still have the shadow. Is there any event that gets fired when a page is loaded so I can rerun the script? I could not find it. Is there any other preferred way of disabling the dropshadow?
Expected behaviour
Disable dropshadow of pages
Does your issue happen with every document, or just one?
every
Code snippet
instance.Core.documentViewer.addEventListener('documentLoaded', () => {
const $pages = iframeDoc.querySelectorAll<HTMLElement>('.pageContainer')
$pages.forEach($page => {
$page.style.setProperty('box-shadow', 'none')
$page.style.setProperty('background-color', 'none')
})