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

HTML to Canvas conversion is not performing for dynamic nested DOM objects. #463

Open
sthirunavukarasu opened this issue May 5, 2024 · 1 comment
Labels

Comments

@sthirunavukarasu
Copy link

sthirunavukarasu commented May 5, 2024

HTML to canvas is not working as expected for the dynamic DOM objects without any issue.

Expected Behavior

When use toCanvas method from this library the dynamic dom objects not getting converted as we expected and also for the nested HTML elements are not getting rendered with proper css styles there was some sort issue of applying the styles into those converted HTML to Canvas objects.

When use toCanvas method from this library it has convert Canvas into deepest level of HTML along with respective css styes which is applied to those elments.

Current Behavior

Screenshot 2024-05-02 at 8 06 26 PM

MicrosoftTeams-image (1)

Possible Solution

When we convert HTML to canvas it has to convert Nested DOM objects into deeper level along with defined css styles.

Steps To Reproduce

demo_clip.mp4

code example

const screenshot = await htmlToImage.toCanvas(pdftronUI, {
canvasWidth: this.canvas.height,
canvasHeight: this.canvas.height,
width: this.canvas.width,
height: this.canvas.height,
});

No Error

<!-- Provide a log message if relevant -->

Additional Context

Your Environment

Front-end: React JS
Backend: .Net

  • html-to-image: 1.8.0
  • OS: Mac and Windows
  • Browser: Chrome Browser
@biiibooo
Copy link
Contributor

biiibooo bot commented May 5, 2024

👋 @sthirunavukarasu

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant