Does Android SDK support online viewing PDF file like watching online video? We are using this sdk in Android client, but it takes too long to download big PDF files that like more than 50MB or larger. does newest SDK support viewing PDF file online? does not need download whole file then can viewing it??
Asked
Active
Viewed 154 times
2 Answers
0
I would suggest you to reach their support directly, they offer a blazing fast assistance and the questions are handled directly by the Android team: https://pspdfkit.com/support/request/
PSPDFKit framework offers an extensive set of API and covers multiple platforms (iOS, macOS, Android, Windows, and Web), they'll surely find a solution that works for you.

Sarpe
- 5,747
- 2
- 28
- 26
0
Yes they do, but not out of the box. You can easily create a custom DataProvider
that achieves this:
private class UrlDataProvider(private val url: String) : InputStreamDataProvider() {
private val httpUrl = URL(url)
override fun getSize(): Long {
var connection: HttpURLConnection? = null
return try {
connection = httpUrl.openConnection() as HttpURLConnection
connection.requestMethod = "HEAD"
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N)
connection.contentLength.toLong()
else
connection.contentLengthLong
} catch (t: Throwable) {
E(t)
-1L
} finally {
connection?.disconnect()
}
}
override fun getUid() = url
override fun getTitle() = File(url).name.nullIfEmpty
override fun openInputStream(): InputStream = httpUrl.openStream()
}
Keep in mind annotation and form filling won't work properly in this case.

0101100101
- 5,786
- 6
- 31
- 55