Join Slack
Powered by
Looking to generate a pdf of the composable. Is th...
# android
s
Scott Courtney
05/26/2023, 6:38 PM
Looking to generate a pdf of the composable. Is that possible in jetpack compose?
m
Mark Murphy
05/26/2023, 10:04 PM
This would be better for
#compose-android
or possibly even
#compose
. There are a variety of libraries to capture a composable to a bitmap, including: •
https://github.com/SmartToolFactory/Compose-Screenshot
•
https://github.com/KaustubhPatange/kapture
•
https://github.com/PatilShreyas/Capturable
However, you would need to create the PDF yourself using the bitmap as the source.
👍 2
z
Zach Klippenstein (he/him) [MOD]
05/27/2023, 5:52 AM
This renders a composable directly to a PDF, but probably won’t work with certain graphics effects and hasn’t been maintained for a while afaik:
https://halilibo.com/compose-richtext/printing/
315
Views
Open in Slack
Previous
Next