Thank you for your solution.
I have following code:
WebViewer
<!-- Custom CSS styles -->
<style>
#container2 {
display: none;
visibility: hidden;
}
button.Button[aria-label="Close Document"] {
display: none;
}
div.DropArea > button {
display: none;
}
.DropArea {
display: none;
}
.Button {
dip
</style>
But it does not work and I have no change in the UI
I also tried as follows, but without result too:
const wvElement = document.getElementById(‘viewer’);
WebViewer({
path: ‘/sap/bc/lib’, // path to the Apryse ‘lib’ folder on your server
licenseKey: ‘___’, // sign up to get a key at https://dev.apryse.com
fullAPI: true,
loadAsPDF: true,
disabledElements: [
'menuButton',
'toolbarGroup-View',
'selectToolButton'
],
isReadOnly: true,
css: './stylesheet.css'
}, wvElement)
.then((instance) => {
const { UI, Core } = instance;
const { Annotations, documentViewer } =Core;
const { Color } = Annotations;
// Assuming instance.UI.iframeWindow is the iframe window object
const iframeDoc = instance.UI.iframeWindow.document;
const zoomOverlay = iframeDoc.querySelector(‘button[aria-label=“Close Document”]’);
if (zoomOverlay) {
zoomOverlay.style.display = ‘none’;
}
const zoomOverlay2= iframeDoc.querySelector(‘[data-element=“zoomOverlay”]’);
console.log(iframeDoc); // #document
console.log(zoomOverlay); // null
console.log(zoomOverlay2); // null
var Feature = instance.UI.Feature;
console.log(Feature);
thank you in advance