Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black border rendered with an image #111

Open
megaprimatus opened this issue Mar 24, 2023 · 4 comments
Open

Black border rendered with an image #111

megaprimatus opened this issue Mar 24, 2023 · 4 comments

Comments

@megaprimatus
Copy link

megaprimatus commented Mar 24, 2023

Hi,
For some reason the black border is now rendered with an image. I have a standard setup without any extra CSS styles.
In addition the size is always rendered with 800x600px regardless my settings.

hti = Html2Image()
hti.output_path = path
hti.screenshot(html_file=path + '/plot.html', save_as='plot.png', size=(720, 800))

@Murthy582
Copy link

@ser-zhm We ran into the same issue. Were you able to resolve it?

@megaprimatus
Copy link
Author

@ser-zhm We ran into the same issue. Were you able to resolve it?

No unfortunately not

@vgalin
Copy link
Owner

vgalin commented Jun 16, 2023

Could you provide a reproducible example ? By providing the HTML file you're using for example.
Also the issue regarding the size of the generated image could be related to a bug on a recent Chrome version, updating Chrome may at least resolve the size issue.

@kzu
Copy link
Contributor

kzu commented Aug 3, 2023

html2image --html "test.svg" --save "test.png" -v --size 38,38

SVG (unchanged from before):
test

Black background now:
test

Previously (have lost track of exactly when this started to fail):
image

(source repo where I'm doing this, with full history: https://github.com/devlooped/sponsors/tree/main/.github/avatars)

html2image version: 2.0.3
windows 11, ms edge Version 115.0.1901.188 (Official build) (64-bit)
chrome: Versión 115.0.5790.110 (Build oficial) (64 bits)

I hope this helps!

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

No branches or pull requests

4 participants