niklasvh / html2canvas

Screenshots with JavaScript
https://html2canvas.hertzen.com/
MIT License
30.47k stars 4.8k forks source link

Fork the project #3172

Open Zefling opened 4 months ago

Zefling commented 4 months ago

As the project is no longer moving, I forked the project to make it a more open project. If you want to help me to become a maintainer on it, please contact me.

git : https://github.com/html2canvas/html2canvas npm : https://www.npmjs.com/package/@html2canvas/html2canvas

I also merged 2 branches that had started doing this for personal needs. Thanks @acurrieclark and @wtto00

SRochas commented 4 months ago

Excited to see a fork of this! I'm personally trying to use some React screenshot-taking libraries that are all based off of html2canvas. html2canvas seems to have issues with React17+ with the screenshot appearing distorted. (Here's the SO for additional context).

Do you have any plans with what you'd like to do with the library? I'd love to see a fix to these issues.

AgentSmith0 commented 4 months ago

@Zefling Very cool, thank you for your work! What about enabling the issues and discussions tab?

Zefling commented 4 months ago

Oops, sorry, it's fixed. I activated the issues.

nocarroll-v8m commented 4 months ago

Hi @Zefling , very cool to see a fork of this project.

Is performance improvement part of the scope of your fork?

I am seeing some heavy memory usage in DocumentCloner.cloneNode and I am curious if it is something you are looking to address?

Thanks!

dionysiusmarquis commented 4 months ago

The approach of html-to-image seems a bit like a successor to html2canvas to me. What are use cases exclusively for the approach of html2canvas?

cyfung1031 commented 4 months ago

The approach of html-to-image seems a bit like a successor to html2canvas to me. What are use cases exclusively for the approach of html2canvas?

The author of html2canvas has paid a lot of effort to resolve many minor issues (e.g. CSS and transform work) on the image generation.

Any case that html-to-image is better?

cyfung1031 commented 4 months ago

@Zefling
https://github.com/html2canvas/html2canvas/blob/master/CHANGELOG.md Why the changes mentioned in 1.5.x are already merged into the niklasvh/html2canvas before 1.5.x released?

Zefling commented 4 months ago

@cyfung1031 I copied the changelog from the branch. I'm going to take the 1.5.x changelog, it's a bit of a mess.

Haven't had much time to take care of it lately. Basically, I made this version because I needed what was in it and it wasn't easy to have projects maintained by only one person.

I insist, I did the project precisely so that there is not a single maintainer. If you want to help, just ask me.

dionysiusmarquis commented 4 months ago

The author of html2canvas has paid a lot of effort to resolve many minor issues (e.g. CSS and transform work) on the image generation.

Any case that html-to-image is better?

html-to-image utilises svg rendering. It basically uses the exact same way the browser renders everything. Therefore it’s possible to get pixel perfect renders of html elements in any state.

I didn’t necessarily try to say html-to-image is “better”. It just feels like a simpler/slimmer approach with more accurate results. But maybe html2canvas is faster or fits better in other fields, so it’s worth to pursue this approach? That’s what my question was aiming at.

cyfung1031 commented 4 months ago

@cyfung1031 I copied the changelog from the branch. I'm going to take the 1.5.x changelog, it's a bit of a mess.

Haven't had much time to take care of it lately. Basically, I made this version because I needed what was in it and it wasn't easy to have projects maintained by only one person.

I insist, I did the project precisely so that there is not a single maintainer. If you want to help, just ask me.

Um. I just want to know what are the changes added in the forked repo, compared to the 1.4.1 released in 2022.01.23 If those changes are already merged into niklasvh/html2canvas, those changes should have been incorporated in 1.4.1 right?

Just want to clarify what are the new in the forked repo.

Zefling commented 4 months ago

I rewrote the changelog for v1.6.0 : https://github.com/html2canvas/html2canvas/blob/master/CHANGELOG.md#160-2024-05-08

Zefling commented 4 months ago

I see @mhchoi1997 also did a fork, but all its code is in Korean.

ambrt commented 3 months ago

Html-to-image seems to be last released 1 year ago.

If there are issues since then, then it can be considered abandoned.

Anyway, bumping this for more exposure.

yorickshan commented 3 months ago

Feel free to try using html2canvas-pro v1.5.5 or the most recent version.