@cali_green
To get the height of a PDF document loaded in an iframe, you can use JavaScript to access the iframe element and then get the height of the content inside the iframe. Here's a step-by-step guide on how to achieve this:
1
|
var iframe = document.getElementById('your-iframe-id'); |
1
|
var doc = iframe.contentDocument || iframe.contentWindow.document; |
1
|
var height = doc.body.scrollHeight; |
Here is an example code snippet that you can use:
1 2 3 4 |
var iframe = document.getElementById('your-iframe-id'); var doc = iframe.contentDocument || iframe.contentWindow.document; var height = doc.body.scrollHeight; console.log('Height of the PDF document: ' + height); |
Make sure to replace 'your-iframe-id' with the actual ID of the iframe element in your HTML document.
By following these steps, you should be able to get the height of a PDF document loaded in an iframe using JavaScript.