hi. while ive read posts on how to crop canvas, its output is base 64 png. and yes, not everyone has access to the server so doing the trimming client side would definitely be helpful.
would like to request to have a crop for base 64 svg. svg is still best for output because it is vector.
bump. this is a very useful feature. ^_^
i hope this feature gets some interest
Three years in and not even a reply. Bump
Three years in and not even a reply. Bump
Alright this made me emotional and want to close this issue once and for all . Will be back with solution. happy Coding.
PRs are welcome, though if this cropping code could be implemented as a separate library or as a separate function that can doesn't have to imported if it's not used, that would be preferable to avoid bloating this library with features few people need.
Also, I'm not really maintaining this library anymore. I'll try to clean up a few things soon and update the README file with information that I'm looking for a maintainer.
I am sorry that I sounded offensive. I did not intend to offend anyone. Thank you for this package, I am happily using it. What I do not like on my search for specific answers is browsing through old and open tickets that did not receive any response, so perhaps I overlooked szimeks apparent response, that he took it up as an enhancement. Again, thank you for for this package.
To anyone desperately looking up ways for cropping SVG, I found out about multiple solutions.
fabric.loadSVGFromURL(svgFilePath, () => {
// these are your signature path elements grouped together
var loadedObjects = new fabric.Group(group);
},
function (item, object) {
object.set("id", item.getAttribute("id"));
group.push(object);
}
);
2, You can modify the viewBox property in your SVG xml code to only show the signature.