https://kotlinlang.org logo
#ktor
Title
# ktor
r

Ray

06/02/2021, 9:18 PM
Hi all anyone here know of a library i can use to generate a pdf or excel in ktor that can be downloaded from the client side(web/mobile). i can't seem too find any
Or do you want to read pdf from files and return that?
c

Casey Brooks

06/02/2021, 11:14 PM
I’ve had good success generating PDFs from HTML with openhtmltopdf, a pure-Java PDF renderer with good support and is actively maintained (https://github.com/danfickle/openhtmltopdf) . A lot of PDF renderers call to native libraries, link with a headless Chrome instance, or some other hacks that are much less portable For generating excel files, CSV format is much simpler to generate. You shouldn’t even need any libraries, just write that string yourself
r

Ray

06/03/2021, 8:00 AM
thanks a lot @Big Chungus@Casey Brooks. I'll look a them now 🙏🏽
m

Matteo Mirk

06/03/2021, 10:31 AM
To read and write Excel files there’s Apache POI