Skip to content

A sample project that uses Expo and shows how to create a PDF viewer app for both web and mobile with a single codebase between React and React Native.

License

Notifications You must be signed in to change notification settings

fweinaug/pdftron-react-and-react-native-sample

 
 

Repository files navigation

  • npx expo run:android: Could not find com.pdftron:pdftron:10.8.0
  • npx react-native run-android: 'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.

my assumption is that both errors are caused by the same issue, which is that the pdftron library is not being included in the android build.

PDFTron React and React Native PDF Viewer Sample

This sample project uses Expo and shows how to create a PDF viewer app for both web and mobile with a single codebase between React and React Native.

demo

Install

git clone https://github.com/PDFTron/pdftron-react-and-react-native-sample.git
cd pdftron-react-and-react-native-sample
npm install

Run

Web

npm run web

iOS

  1. Install dependencies
cd ios
pod install
cd ..
npm run ios

Android

  1. Create a local.properties file inside the android folder with your Android SDK location, for example:
ndk.dir=/Users/pdftron/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/pdftron/Library/Android/sdk
npm run android

Guides

Contributing

See contributing.

License

See license.

About

A sample project that uses Expo and shows how to create a PDF viewer app for both web and mobile with a single codebase between React and React Native.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 38.6%
  • Objective-C 36.2%
  • TypeScript 12.4%
  • JavaScript 6.6%
  • Ruby 6.2%