Expose screenshot args?

This issue has been created since 2020-11-30.

This package hides a lot of the screenshot arguments available in puppeteer. Can they be exposed?

`
page.screenshot([options])

options Options object which might have the following properties:
path The file path to save the image to. The screenshot type will be inferred from file extension. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the image won't be saved to the disk.
type Specify screenshot type, can be either jpeg or png. Defaults to 'png'.
quality The quality of the image, between 0-100. Not applicable to png images.
fullPage When true, takes a screenshot of the full scrollable page. Defaults to false.
clip An object which specifies clipping region of the page. Should have the following fields:
x x-coordinate of top-left corner of clip area
y y-coordinate of top-left corner of clip area
width width of clipping area
height height of clipping area
omitBackground Hides default white background and allows capturing screenshots with transparency. Defaults to false.
encoding The encoding of the image, can be either base64 or binary. Defaults to binary.
returns: <Promise<string|Buffer>> Promise which resolves to buffer or a base64 string (depending on the value of encoding) with captured screenshot.
`

frinyvonnick wrote this answer on 2020-12-01

Hi @kashyap-aditya 👋

As you can see in the README some of these options are already implemented like path, type, quality, encoding and omitBackground that as been renamed transparent. There are only two missing options in your list that are fullPage and clip. Do you need these and would you like to implement them? Does this PR is a good replacement for the clip option?

kashyap-aditya wrote this answer on 2020-12-01
frinyvonnick wrote this answer on 2020-12-01

@kashyap-aditya what is your usecase? Does targeting a specific element in the dom would fulfill the need of the clip option instead of the original which seems not simple to use for me?

frinyvonnick wrote this answer on 2021-06-26

@kashyap-aditya I released a new version that let you screenshot a specific element in the dom. I close this issue, feel free to reopen it if it does not fit with your need.

More Details About Repo
Owner Name frinyvonnick
Repo Name node-html-to-image
Full Name frinyvonnick/node-html-to-image
Language TypeScript
Created Date 2019-12-05
Updated Date 2022-08-08
Star Count 545
Watcher Count 7
Fork Count 78
Issue Count 20

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Expose logs for failed builds 5 2021-04-28 2022-08-02
Migrations folder value is not persistent 2 2022-02-01 2022-07-22
Exception when calling Add Migration with a shortcut 5 2022-02-01 2022-08-05
Database: Show only migrations related to selected DbContext in Update Database's Target migration autocompletion 0 2022-01-23 2022-07-08
Fixed effect interaction with function fails 2 2022-01-11 2022-07-17
Update Trafficlight Positions 0 2021-06-09 2022-07-07
Hatch new doesn't put the default system python in tox.ini envlist 3 2022-02-28 2022-07-07
Ffmpeg faster 0 2021-11-06 2022-01-02
BVH Fastest way to check if contained in a box/geometry 3 2022-01-27 2022-07-27
Nomad Pack: Plan/Run benefits 0 2022-07-11 2022-08-09
Enable status LED 4 2021-09-06 2022-01-09
兼容oracle部分的代码可以开源学习一下吗~ 1 2021-07-02 2022-08-06
Table cell's content is not centered despite `|:---:|` forced alignment 1 2021-10-09 2022-07-26
[Bug] 稍后再看界面无法直接删除列表视频 1 2022-03-28 2022-07-16
Failed to write memory at 0x24100000 2 2021-02-13 2022-07-15
Disallow nonsensical values for Webmin tempdir 24 2022-01-25 2022-08-06
the state object of the program‘s exit point 2 2021-12-23 2022-08-07
运动暂停会计入运动总时间 5 2021-12-31 2022-01-15
请问mapbox不显示是什么问题 11 2021-06-30 2022-01-15
Update PHP Version in webdevops/php-dev:7.4-alpine image 2 2021-12-17 2022-07-29
Keep getting error: "invalid json response body at reason: Unexpected end of JSON input" 1 2021-01-20 2022-08-03
Reduce the log level of wickedd-dhcp6 1 2022-06-29 2022-08-01
Generate HTML reports 0 2021-07-14 2022-07-13
Can noverify check code formatting? 1 2021-10-13 2022-08-03
Temporarily remove application menu 3 2021-05-25 2022-08-13
Metadata for schema definition? 7 2021-07-29 2022-08-04
There are no kinects, returning null 2 2021-03-08 2022-08-04
Kinect in full screen 1 2020-02-24 2022-08-04
Create maybeSingle() function 8 2021-05-21 2022-07-25
`Reline::Terminfo::TerminfoError` error with Overmind 1 2022-06-08 2022-08-10
[Docker] Redis possibly not running 1 2021-08-16 2022-02-17
PedigreeImg shown in FamilyLayout in PopupWithModal is broken 4 2022-04-05 2022-08-08
broken commutativity for roaring64.FastOr 14 2021-08-04 2022-08-05
No new pairing and some other trouble 2 2021-12-07 2022-08-07
Error: AWS Designer: Cannot convert the template because of an error:: duplicated mapping key at line 900, column 38: ... Name: ProvideApproval 1 2021-09-12 2022-07-29
大神们好,我想问一下在服务器端把gmssl配置好了双向认证,在window机器上,有360浏览器把证书导了进去还是不行 0 2022-04-26 2022-08-11
Upgrade HotROD example to use OpenTelemetry SDK 4 2021-11-08 2022-07-09
bug: tfsec_checksums.txt not provided with 0.63.1 1 2022-03-16 2022-07-29
Export rollout.Status.CurrentPodHash in rollout_info metric 0 2021-09-15 2022-07-08
Add support for tagging files in memory tables 0 2021-05-27 2022-07-11
There is a vulnerability in google-gson 2.7,upgrade recommended 1 2022-06-06 2022-07-21
Update go modules on regression/publish 0 2021-08-31 2022-07-13
log: use sync.Pool to reduce allocations 3 2021-05-20 2022-07-17
context: optimize Err by removing defer 7 2017-10-23 2022-07-12
[JIT] [Autocast] JIT Autocast Pass operations' list should be extendable and consistent with imperative path 4 2022-04-18 2022-07-21
Connection Failure to AWS IoT Core 8 2021-06-30 2022-08-05
winget install microsoft.nuget --> 0x80070032 : The request is not supported. 4 2022-07-26 2022-08-12
Enabling kubeStateMetricsCore disables other clusterAgent checks 4 2021-05-17 2022-07-29
Timezone error in Energy dashboard 3 2022-03-08 2022-07-14
On the drill down in tree map charts, is it possible to show the prior label name on the chart? 2 2022-02-28 2022-07-18