You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Library is available in jcenter repository, probably it'll be in Maven Central soon.
33
37
@@ -86,6 +90,21 @@ By using constructor with second argument (`new DefaultScrollHandle(this, true)`
86
90
You can also create custom scroll handles, just implement **ScrollHandle** interface.
87
91
All methods are documented as Javadoc comments on interface [source](https://github.com/barteksc/AndroidPdfViewer/tree/master/android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/scroll/ScrollHandle.java).
88
92
93
+
## Document sources
94
+
Version 1.5.0 introduced _document sources_, which are just providers for PDF documents.
95
+
Every provider implements **DocumentSource** interface.
96
+
Predefined providers are available in **com.github.barteksc.pdfviewer.source** package and can be used as
97
+
samples for creating custom ones.
98
+
99
+
Predefined providers can be used with shorthand methods:
100
+
```
101
+
pdfView.fromUri(Uri)
102
+
pdfView.fromFile(File)
103
+
pdfView.fromBytes(byte[])
104
+
pdfView.fromStream(InputStream)
105
+
pdfView.fromAsset(String)
106
+
```
107
+
Custom providers may be used with `pdfView.fromSource(DocumentSource)` method.
0 commit comments