I use the plug-in pdf.js to add pdf content to div, using the canvas canvas loop and then use getComputedStyle to get all the properties of the div. The value of height that appears in the CSSStyleDeclaration object is correct
attach my code:
/ / when the page is loaded, the value of the current page is set to 1
window.onload = function ()
{
document.getElementById("page_num").textContent = 1;
var div = document.getElementById("canvas_list");
var s = window.getComputedStyle(div,null);
console.log(s);
console.log(s.height);
};