M
M
moem2018-07-22 19:36:55
JavaScript
moem, 2018-07-22 19:36:55

How to save the browser window or its selected part as an image?

Hello.
Please advise libraries for saving the contents of the browser window or its selected part as an image.
Also of interest is a library for drawing in the browser window as on a canvas (for example, as in the presentations of the pruffme service).
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
twobomb, 2018-07-30
@twobomb

Once I needed a similar function for this effect . I used html2canvas library

F
forspamonly2, 2018-07-22
@forspamonly2

really not at all. browsers consider this a security breach and categorically do not allow simple pages. methods that are available in browsers are available only to plugins.
there are libraries that try to do it themselves - essentially replicate the browser rendering job. Of course, this turns out to be very bad, since only coordinates and basic properties can be obtained from the house more or less reliably, and there is no chance to depict all the transformations, filters, and other bells and whistles.
the most realistic way to get a real screenshot is some puppeteer thread on the server. your own server, or some third party that provides such api.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question