Tabletop-Mirror / Issues-and-Tasks

0 stars 0 forks source link

Upgrade PDF Libraries #84

Closed VarunS1997 closed 3 months ago

VarunS1997 commented 4 months ago

PDF Libraries for in-browser PDF generation kind of suck.

Apparently this is the best: https://pdfkit.org/

That being said, we need to figure out how to get it to run in-browser with something like Browserify. There's some resources for how to do that here: https://github.com/foliojs/pdfkit

BUT, we don't know how Browserify works, so we have to first understand that.

VarunS1997 commented 3 months ago

We got something kind-of working with the webpack bundling included with Angular.

That being said, fonts still don't quite work, so we have to figure out how to do that...

An alternative to pursue in parallel is "JSpdf", another library, which is apparently easier to work with generally.

VarunS1997 commented 3 months ago

After a lot of pain, and misery, I decided to actually just make this a backend operation.

There's now a new backend API for generating PDFs. That means some changes need to happen on the front-end to match this change, which we will do in #85