Skip to content

Use webshot2 when generating image files with gtsave()#985

Merged
rich-iannone merged 3 commits intomasterfrom
gtsave-webshot2
Jul 7, 2022
Merged

Use webshot2 when generating image files with gtsave()#985
rich-iannone merged 3 commits intomasterfrom
gtsave-webshot2

Conversation

@rich-iannone
Copy link
Member

This changes the image-generating implementation of gtsave() when specifying a PNG or PDF. Here, webshot2 will be used instead of webshot and this will provide higher-fidelity images (due to better rendering with headless Chrome compared to PhantomJS). This change also allows for customization of the selector option during invocation of the webshot2::webshot() function (defaulting to "table", which is the same as previously).

Fixes: #621
Fixes: #885

@rich-iannone rich-iannone requested a review from cscheid July 7, 2022 15:59
@rich-iannone rich-iannone changed the title Use **webshot2** for generating image files with gtsave() Use webshot2 when generating image files with gtsave() Jul 7, 2022
Copy link
Member

@cscheid cscheid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming tests pass, this is good.

@rich-iannone rich-iannone merged commit c3fc4de into master Jul 7, 2022
@rich-iannone rich-iannone deleted the gtsave-webshot2 branch July 7, 2022 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saving table as PNG doesn't keep some font styling (i.e. bold) Add ability to use webshot2 when it lands on CRAN?

2 participants