yWorks / jsPDF

JavaScript PDF generation to work with SVG
MIT License
56 stars 23 forks source link

svg2pdf as a plugin for jspdf #8

Closed rafiek closed 6 years ago

rafiek commented 6 years ago

Will this great solution ever be a plugin for jspdf?

HackbrettXXX commented 6 years ago

Currently, this is not our plan (@yGuy ?). Is there a specific reason why you need it as plugin? Or do you mean it should be a plugin for the original jsPDF?

yGuy commented 6 years ago

svg2pdf needs to use a fork of the original jsPDF since we are using a completely different approach to to the coordinate conversion (the original version has some severe limitations in this area and we would have to implement major workarounds around jsPDF's current behavior in order to get a working result). Using our own fork makes svg2pdf a lot simpler. And since we also had to implement a couple of workarounds and completely new features, it is not feasible anymore to go back to the original version. Sadly, this also means that most of the plugins are incompatible between the two versions and thus making svg2pdf a plugin for the original version is not feasible and making it a plugin for our fork doesn't gain you much either. In fact I would argue that you gain nothing, so I don't see the point, here. If someone rewrites svg2pdf as a plugin to our jspdf that would be OK and we would probably accept that pull-request, even though there is little to no benefit. If someone manages to adjust svg2pdf to work with the original jsPDF that would be really cool, however that is a major undertaking that we are currently not willing to invest our time in. I'm closing this one for now. Feel free to reopen if you think you have found a good reason for that!