Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-pdf-view

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-pdf-view - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "react-native-pdf-view",
"version": "0.1.2",
"version": "0.1.3",
"description": "view pdf file using react-native",

@@ -5,0 +5,0 @@ "main": "PDFView.js",

# react-native-pdf-view
React Native PDF View
React Native PDF View (Android Only)
### Installation

@@ -8,3 +9,53 @@ ```bash

```
* In `android/setting.gradle`
```gradle
...
include ':PDFView'
project(':PDFView').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pdf-view/android')
```
* In `android/app/build.gradle`
```gradle
...
dependencies {
...
compile project(':PDFView')
}
```
* register module (in MainActivity.java)
```java
import com.keyee.pdfview.PDFView; // <--- import
public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
......
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mReactRootView = new ReactRootView(this);
mReactInstanceManager = ReactInstanceManager.builder()
.setApplication(getApplication())
.setBundleAssetName("index.android.bundle")
.setJSMainModuleName("index.android")
.addPackage(new MainReactPackage())
.addPackage(new PDFView()) // <------ add here
.setUseDeveloperSupport(BuildConfig.DEBUG)
.setInitialLifecycleState(LifecycleState.RESUMED)
.build();
mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null);
setContentView(mReactRootView);
}
......
}
```
### Usage

@@ -11,0 +62,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc