Is anyone working on a multiplatform library for g...
# multiplatform
i
Is anyone working on a multiplatform library for generating pdfs?
👀 3
j
Do you have any use cases to share? To measure the complexity of the task
i
Oh gosh…well I am actually working on a character creator for Pathfinder (D&D like game). The end result will be to generate a PDF of the completed character. This will be many pages of static content generated from values captured and computed by my app. The best way to handle that might be to use one of the libraries that converts HTML to PDF. At least that would allow me to create a decent looking and very complex set of sheets. At a minimum it needs to support IOS and Android and eventually desktop and/or web. At the moment I’m planning to create a service on AWS that will generate and cache the PDF returning a link where the user will be able to download it. Long term this might be the best bet anyway.
b
Not ideal, but you can always expect/actual: • on jvm/android - https://pdfbox.apache.org/ • ios - https://github.com/vsouza/awesome-ios#pdf • web - https://github.com/foliojs/pdfkit
As for your original question, I strongly doubt anyone is working on such lib at the moment. Especially with your target set.
i
@Big Chungus Thank you for the response! I had considered doing something like this but the design of the sheets won’t be trivial and I suspect I won’t be able to use the same HTML -> PDF conversion with three+ different libraries.
b
Well they all take a static html string and spit out some sort of pdf. I'd imagine html has the most influence to the output so should not be that hard to wrap a tailor-made expect-actuals bridge that solves ONLY your case.
i
@Big Chungus I think you’re right but it was worth the ask. I’m finding most of the libraries are quite old but as far as I know there really isn’t an alternative to PDF that would work for the Use case (also needs to print on any old personal printer).
b
Making it generally useful is the main challenge when building such libs
i
@Big Chungus I agree. I think most folks avoid needing to generate PDFs from mobile.