Hello, I have been struggling in creating thumbnail of PDF in IOS, can anyone help for same? Or any suggestions?
f
Frank Bouwens
02/18/2025, 3:32 PM
Does it have to be local and native?
There might be a way to do that server-side.
Or a way to show it in a WebView.
Frank Bouwens
02/18/2025, 3:33 PM
I’m sadly not familiar with a system to create previews of PDF’s.
But I do know there’s a PDF renderer in Google Chrome. A server could run a Chrome instance to get a PDF, and send back a screenshot.
thank you color 1
a
Abhishek Sharma
02/19/2025, 4:41 PM
Looking forward to the server side approach now.
j
joseph_ivie
02/20/2025, 5:53 AM
https://developer.apple.com/documentation/pdfkit/pdfthumbnailview?language=objc
KMP's natural use is to use the native views.
Granted, I'm not a Compose guy, so I don't know how that interacts. But if you're using the native views or you can bridge to them, you could get that here.
If you want an image specifically, you can draw views to a bitmap IIRC in UIKit.