@@ -10,11 +10,15 @@ Library for displaying PDF documents on Android, with `animations`, `gestures`,
10
10
It is based on [ PdfiumAndroid] ( https://github.com/barteksc/PdfiumAndroid ) for decoding PDF files. Works on API 11 (Android 3.0) and higher.
11
11
Licensed under Apache License 2.0.
12
12
13
- ## What's new in 2.6.0?
14
- * Fix fling on single-page documents
15
- * Greatly improve overall fling experience
13
+ ## What's new in 2.7.0-beta?
14
+ * Update PdfiumAndroid to 1.6.1, which fixed font rendering (issue #253 )
15
+ * Add ` .spacing(int) ` method to add spacing (in dp) between document pages
16
+ * Fix drawing with ` .onDraw(onDrawListener) `
17
+ * Add ` .onDrawAll(onDrawListener) ` method to draw on all pages
18
+ * Add small rendering improvements
19
+ * Fix rendering when duplicated pages are passed to ` .pages(..) `
16
20
17
- Version 2.6.1. fixes disappearing scroll handle
21
+ This is beta release because of big number of small changes and something could go wrong (but I didn't notice)
18
22
19
23
## Changes in 2.0 API
20
24
* ` Configurator#defaultPage(int) ` and ` PDFView#jumpTo(int) ` now require page index (i.e. starting from 0)
@@ -29,7 +33,7 @@ Version 2.6.1. fixes disappearing scroll handle
29
33
30
34
Add to _ build.gradle_ :
31
35
32
- ` compile 'com.github.barteksc:android-pdf-viewer:2.6.1' `
36
+ ` compile 'com.github.barteksc:android-pdf-viewer:2.7.0-beta' ` or ` 2. 6.1` for more stable version
33
37
34
38
Library is available in jcenter repository, probably it'll be in Maven Central soon.
35
39
@@ -62,7 +66,10 @@ pdfView.fromAsset(String)
62
66
.swipeHorizontal(false )
63
67
.enableDoubletap(true )
64
68
.defaultPage(0 )
65
- .onDraw(onDrawListener) // allows to draw something on a provided canvas, above the current page
69
+ // allows to draw something on the current page, usually visible in the middle of the screen
70
+ .onDraw(onDrawListener)
71
+ // allows to draw something on all pages, separately for every page. Called only for visible pages
72
+ .onDrawAll(onDrawListener)
66
73
.onLoad(onLoadCompleteListener) // called after document is loaded and starts to be rendered
67
74
.onPageChange(onPageChangeListener)
68
75
.onPageScroll(onPageScrollListener)
@@ -72,6 +79,8 @@ pdfView.fromAsset(String)
72
79
.password(null )
73
80
.scrollHandle(null )
74
81
.enableAntialiasing(true ) // improve rendering a little bit on low-res screens
82
+ // spacing between pages in dp. To define spacing color, set view background
83
+ .spacing(0 )
75
84
.load();
76
85
```
77
86
0 commit comments