react-native-pdf-view
Advanced tools
Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "react-native-pdf-view", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A pdf file view component for react native.", | ||
"main": "PDFView.js", | ||
"main": "index.js", | ||
"repository": { | ||
@@ -7,0 +7,0 @@ "type": "git", |
@@ -32,5 +32,21 @@ # react-native-pdf-view | ||
On newer versions of React Native (0.18+): | ||
```java | ||
import com.keyee.pdfview.PDFView; // <--- import | ||
public class MainActivity extends ReactActivity { | ||
...... | ||
@Override | ||
protected List<ReactPackage> getPackages() { | ||
return Arrays.<ReactPackage>asList( | ||
new PDFView(), // <------ add here | ||
new MainReactPackage()); | ||
} | ||
} | ||
``` | ||
On older versions of React Native: | ||
```java | ||
import com.keyee.pdfview.PDFView; // <--- import | ||
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { | ||
@@ -93,3 +109,3 @@ ...... | ||
src={"sdcard/pdffile.pdf"} | ||
onLoadComplete = {()=>{ | ||
onLoadComplete = {(pageCount)=>{ | ||
this.pdfView.setNativeProps({ | ||
@@ -117,2 +133,2 @@ zoom: 1.5 | ||
| zoom | number | 1.0 | zoom scale | ||
| onLoadComplete | function | null | page load complete | ||
| onLoadComplete | function | null | page load complete,return page count |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20049066
64
40
132