How to get the total height of the pdf when loading the entire pdf with pdf.js and adding it to the div loop with div

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
clipboard.png

clipboard.png

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);

};

May.31,2021
Menu