Skip to content

Conversation

terryyoon-pdftron
Copy link
Contributor

@terryyoon-pdftron terryyoon-pdftron commented Aug 19, 2022

NSDK-168

Overview:

This PR replaces the sample app in the example folder with a more comprehensive app instead of a standalone PDF viewer in order to better demonstrate how the wrapper can be embedded in an existing app and how its API can be used.

The app is a simple file manager within the app's folder with the ability to add files from the device's local storage or from the web, plus other miscellaneous functionalities. It uses this package for opening PDF files and for converting Office files to PDF.

The app is built using Expo SDK 46 with bare workflow (ejected) and React Native version 0.69.4.

Relevant changes are in the file App.tsx and the files under the components directory (other changes are due to React Native version changes and using Expo). Testing future changes can now be done by modifying the PDFViewer.tsx file instead of App.js.

Testing:

  • Checkout this branch in the outer repo.
  • Delete node_modules, and run yarn install
  • Within node_modules, delete react-native-pdftron, clone this repo and re-name it to react-native-pdftron.
  • Run the app:
    • iOS: yarn ios
    • Android: yarn android

@sgong-pdftron
Copy link
Contributor

@darrenchann could you please perform first round of review, thanks.

Copy link
Contributor

@darrenchann darrenchann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS: needs the similar changes done by @dluco to fix folder structure and library dependency issues found when running app
https://github.com/PDFTron/react-native-sample/pull/23/commits

Android:
runs fine

@sgong-pdftron sgong-pdftron marked this pull request as draft March 1, 2023 16:28
@126punith
Copy link

🚀 Solution: react-native-pdf-jsi - 16KB Compliant + 80x Faster!

Hi! I've built a solution that addresses the 16KB page size requirement without requiring React Native upgrades.

Key Benefits:

  • Google Play 16KB Compliant - Built with NDK r28.2, ready for Android 15+
  • No RN Upgrade Needed - Works with RN 0.65.1+ (no need for 0.77)
  • 80x Faster Performance - JSI integration bypasses bridge overhead
  • Drop-in Replacement - Same API as existing PDF libraries
  • Production Ready - Already published 3 apps successfully

🔧 Quick Migration:

npm install react-native-pdf-jsi react-native-blob-util
// Just change import - everything else stays the same
import Pdf from 'react-native-pdf-enhanced';

📊 16KB Compliance Check:

import { PDFJSI } from 'react-native-pdf-enhanced';
const result = await PDFJSI.check16KBSupport();
console.log('Compliant:', result.googlePlayCompliant); // true ✅

🎯 Why This Solves Your Problem:

  • Built-in 16KB Support - No more Google Play rejections
  • Future-Proof - Ready for November 2025 requirements
  • Performance Boost - Bonus JSI acceleration
  • Easy Migration - ~30 minutes per app

📦 Links:

Note: This specifically solves PDF-related 16KB issues. Other native libraries may need separate fixes.

Hope this helps! Feel free to ask if you have questions about the migration process.


Built specifically to solve the 16KB page size requirement while boosting performance. No more upgrade headaches! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants