Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ace748b

Browse files
committed
Update pdfium-android library to 1.1.0
Update version to 1.1.2 Update README
1 parent 4b578bc commit ace748b

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Licensed under Apache License 2.0.
1414

1515
Version 1.1.1 fixes bug with strange behavior when indices passed to `.pages()` don't start with `0`.
1616

17+
Version 1.1.2 updates PdfiumAndroid to 1.1.0, which fixes displaying multiple `PDFView`s at the same time and few errors with loading PDF documents.
1718

1819
Next release is coming soon, it will introduce continuous scroll through whole document
1920
and some incompatibilities with current API (only few small).
@@ -22,7 +23,7 @@ and some incompatibilities with current API (only few small).
2223

2324
Add to _build.gradle_:
2425

25-
`compile 'com.github.barteksc:android-pdf-viewer:1.1.1'`
26+
`compile 'com.github.barteksc:android-pdf-viewer:1.1.2'`
2627

2728
Library is available in jcenter repository, probably it'll be in Maven Central soon.
2829

android-pdf-viewer/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/barteksc/AndroidPdfViewer'
1414
gitUrl = 'https://github.com/barteksc/AndroidPdfViewer.git'
1515

16-
libraryVersion = '1.1.1'
16+
libraryVersion = '1.1.2'
1717

1818
developerId = 'barteksc'
1919
developerName = 'Bartosz Schiller'
@@ -32,13 +32,13 @@ android {
3232
minSdkVersion 11
3333
targetSdkVersion 23
3434
versionCode 1
35-
versionName "1.1.1"
35+
versionName "1.1.2"
3636
}
3737

3838
}
3939

4040
dependencies {
41-
compile 'com.github.barteksc:pdfium-android:1.0.3'
41+
compile 'com.github.barteksc:pdfium-android:1.1.0'
4242
}
4343

4444
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'

android-pdf-viewer/src/main/java/com/github/barteksc/pdfviewer/DecodingAsyncTask.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Bartosz Schiller
3-
* <p/>
3+
* <p>
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
* <p/>
7+
* <p>
88
* http://www.apache.org/licenses/LICENSE-2.0
9-
* <p/>
9+
* <p>
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -25,7 +25,6 @@
2525
import com.shockwave.pdfium.PdfiumCore;
2626

2727
import java.io.File;
28-
import java.io.FileDescriptor;
2928
import java.io.IOException;
3029

3130
class DecodingAsyncTask extends AsyncTask<Void, Void, Throwable> {
@@ -64,13 +63,13 @@ protected Throwable doInBackground(Void... params) {
6463
}
6564
}
6665

67-
protected FileDescriptor getSeekableFileDescriptor(String path) throws IOException {
66+
protected ParcelFileDescriptor getSeekableFileDescriptor(String path) throws IOException {
6867
ParcelFileDescriptor pfd;
6968

7069
File pdfCopy = new File(path);
7170
if (pdfCopy.exists()) {
7271
pfd = ParcelFileDescriptor.open(pdfCopy, ParcelFileDescriptor.MODE_READ_ONLY);
73-
return pfd.getFileDescriptor();
72+
return pfd;
7473
}
7574

7675
if (!path.contains("://")) {
@@ -84,7 +83,7 @@ protected FileDescriptor getSeekableFileDescriptor(String path) throws IOExcepti
8483
throw new IOException("Cannot get FileDescriptor for " + path);
8584
}
8685

87-
return pfd.getFileDescriptor();
86+
return pfd;
8887
}
8988

9089
@Override

0 commit comments

Comments
 (0)