724
Views
4
Comments
Height of web screen
Question

Hi,

I'm trying to create an image from a whole webscreen. This webscreen can vary in height according to the amount of lines. Is there a way to get the height of the full webpage? 

2019-10-24 08-26-27
Babu Basha

Apologies, I am not sure I understand what you are doing. 

Are you trying to do something like a screenshot of your web screen?

If so, you can get the height of the document by using jQuery function $(document).height(). 

If you are setting the height of an image, then use below.

Please see css unit vh which is the height of the view port. if you set the height to 100vh, it will be full height irrespective of screen size.


https://www.w3schools.com/cssref/css_units.asp

UserImage.jpg
Mike Swaans

For extra information i am using the function "ScreenshotToPNG" from the forge extention ultimate pdf. Here i want to use the height of another webscreen as the viewport height 

2019-10-24 08-26-27
Babu Basha

$(document).height() should help get the height for you. The trick is to get your value from JavaScript to your screen action. There are several ways to do it. 

One easy way is to use FakeNotifywidget and call OSNotifyWidget from javascript with your $(document).height()

2026-01-14 17-10-14
Bruno Gonçalves

Just adding some documentation:

https://api.jquery.com/height/

Babu Basha wrote:

$(document).height() should help get the height for you. The trick is to get your value from JavaScript to your screen action. There are several ways to do it. 

One easy way is to use FakeNotifywidget and call OSNotifyWidget from javascript with your $(document).height()



Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.