-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ADDED - scale
parameter to options
#127
Conversation
I think it would be better to apply this through css |
Hi, Thanks |
I'm probably not understanding exactly how HTML2Canvas works, but... would it be possible to add the scale to an element above the foreignObject on the export? So that the exported data has vector scaling (instead of bitmap based): |
html2canvas doesn't use |
Hi. Could anybody review this pull request? It has been a while and this feature is quite important for any retina device. Thx. |
Same as Gargol: on my side, the rendered text looks blurry compared to the rendering of the HTML done by the browser. Also when the browser's zoom set to a value higher than 100% that's even worst. In this scope, having a option's parameter to define the rendering resolution, would be great. But having CSS scaling to render images with an higher resolution, could also be a good workaround. |
quoting @gargol +1 |
@glesperance here: https://github.com/glesperance/html2canvas your "Makefile" file doesn't work. can you please commit the "build" folder in the repo or tell me where can i get your "htmltocanvas.min.js". Thanks. |
@ricricucit If you install ant via brew and then do The PR is actually 2 years old and so I don't know if it still works ; anyway, here's a gist with the built files. https://gist.github.com/glesperance/68627ad5e4da6c99763b Cheers. Gabriel |
thanks. |
@niklasvh |
in the most cases, the body's style is "overflow:hidden", so just set "transform:scale(2)" to aim element is not work as expected |
Hey there,
I needed to make an image out of an element in my webapp and had to output an image that had a scaling factor applied to it.
I couldn't get any success with the
width
andheigh
t properties so I added ascale
parameter that can be passed as an option.Scale can either be a number, or an object of the form
{ x : scaleX, y : scaleY }
. The resulting image should also be of good quality as the scaling factor is applied before the drawing.Cheers,
Gabriel