Answered
How get page width and height?
How get page width and height?
How get page width and height?
const view100ProcentWidth =(viewWidth/zoom) + (viewWidth/zoom)/3 + scrollbarWidth;
and get a real 100% zoom.
Code that takes width and sets 100% width:
document.querySelector("#adobe-dc-view").style.setProperty("height", "50px");
const zoom = await apis.getPageZoom(1);
document.querySelector("#adobe-dc-view").style.removeProperty("height");
const viewWidth = document.querySelector("#adobe-dc-view").clientWidth-scrollbarWidth;
const view100ProcentWidth = (viewWidth/zoom)+scrollbarWidth;
console.log("view100ProcentWidth",view100ProcentWidth);
document.querySelector("#adobe-dc-view").style.width = `${view100ProcentWidth}px`;
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.