react-native-pdf-jsi 2.2.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,19 +3,41 @@
3
3
  [![npm](https://img.shields.io/npm/v/react-native-pdf-jsi.svg?style=flat-square)](https://www.npmjs.com/package/react-native-pdf-jsi)
4
4
  [![Downloads](https://img.shields.io/npm/dm/react-native-pdf-jsi.svg?style=flat-square)](https://www.npmjs.com/package/react-native-pdf-jsi)
5
5
  [![GitHub stars](https://img.shields.io/github/stars/126punith/react-native-enhanced-pdf.svg?style=flat-square)](https://github.com/126punith/react-native-enhanced-pdf)
6
+ [![Documentation](https://img.shields.io/badge/docs-online-blue.svg?style=flat-square)](https://euphonious-faun-24f4bc.netlify.app/)
6
7
 
7
8
  **The fastest React Native PDF viewer with JSI acceleration - up to 80x faster than traditional bridge!**
8
9
 
10
+ ## 🆓 100% FREE - All Features Included!
11
+
12
+ **Every feature is FREE and MIT licensed - no hidden costs, no Pro tier, no subscriptions!**
13
+
14
+ All advanced features that were previously paid are now completely FREE:
15
+ - ✅ **Bookmarks with 10 Colors** - Create, organize with custom colors
16
+ - ✅ **Reading Analytics** - Track progress, sessions, and insights
17
+ - ✅ **Export to Images** - PNG/JPEG export with quality control
18
+ - ✅ **PDF Operations** - Split, merge, extract, rotate, delete pages
19
+ - ✅ **PDF Compression** - Reduce file sizes with smart presets
20
+ - ✅ **Text Extraction** - Extract and search text from PDFs
21
+ - ✅ **File Management** - Download to storage, open folders (Android)
22
+ - ✅ **All Performance Features** - JSI acceleration, smart caching
23
+
24
+ **Use commercially without restrictions - MIT License!**
25
+
26
+ 📚 **[Complete Documentation Website](https://euphonious-faun-24f4bc.netlify.app/)** - API Reference, Guides, and Examples
27
+
9
28
  ### Key Advantages:
29
+ - 🆓 **100% FREE** - All features MIT licensed, no subscriptions or hidden fees
10
30
  - ✅ **Google Play 16KB Compliant** - Ready for Android 15+ requirements
11
- - ⚡ **High Performance** - JSI integration for faster rendering
31
+ - ⚡ **High Performance** - JSI integration for faster rendering (80x faster)
12
32
  - 🚀 **Easy Migration** - Drop-in replacement for existing PDF libraries
13
- - 📄 **Lazy Loading** - Optimized loading for large PDF files
33
+ - 📄 **Advanced Features** - Bookmarks, analytics, export, compression all FREE
14
34
  - 🎯 **Smart Caching** - 30-day persistent cache system
15
- - 🛡️ **Future-Proof** - Built with latest NDK r27+ and modern toolchain
35
+ - 🛡️ **Future-Proof** - Built with latest NDK r28.2+ and modern toolchain
16
36
 
17
37
  A high-performance React Native PDF viewer component with JSI (JavaScript Interface) integration for enhanced speed and efficiency. Perfect for large PDF files with lazy loading, smart caching, progressive loading, and zero-bridge overhead operations.
18
38
 
39
+ **🎓 [Read Full Documentation](https://euphonious-faun-24f4bc.netlify.app/)** - Complete guides, API reference, and examples
40
+
19
41
  ## ✅ **Google Play 16KB Page Size Compliance**
20
42
 
21
43
  Starting November 1, 2025, Google Play will require apps to support 16KB page sizes for devices with Android 15+. **react-native-pdf-jsi is built with NDK r27+ and fully supports Android 15+ requirements**, ensuring your app meets Google Play policy requirements.
@@ -35,6 +57,35 @@ Starting November 1, 2025, Google Play will require apps to support 16KB page si
35
57
  - ✅ **Google Play Approved** - Meets all current and future requirements
36
58
  - ✅ **Drop-in Replacement** - Easy migration from existing libraries
37
59
 
60
+ ## 🎉 Version 3.0.0 - Major Release with Complete Feature Sync!
61
+
62
+ **Complete synchronization of all features from development package with enhanced Android capabilities!**
63
+
64
+ ### 🚀 **What's New in v3.0.0:**
65
+ - **📦 Complete Feature Sync** - All features from local development package now in production
66
+ - **📥 FileDownloader Module** - Native Android module for downloading files to public storage using MediaStore API
67
+ - **📂 FileManager Module** - Native Android module for opening Downloads folder with multiple fallback strategies
68
+ - **🔧 PDFTextExtractor Utility** - JavaScript wrapper for native text extraction with search capabilities
69
+ - **✅ Enhanced Structure** - Complete src/utils directory with all utility modules
70
+ - **✅ Android 10+ Support** - Scoped Storage compliant with MediaStore API for Android 10+
71
+ - **✅ Legacy Support** - Backward compatible with Android 9 and below using legacy storage
72
+ - **✅ Smart Notifications** - Download completion notifications with "Open Folder" action
73
+ - **✅ Text Search & Statistics** - Advanced text extraction with search and statistics features
74
+ - **✅ Production Ready** - All development features now available in stable release
75
+
76
+ ## 🎉 Version 2.2.8 - Android File Download & Management Features!
77
+
78
+ **New Android native modules for file download and folder management with MediaStore API support!**
79
+
80
+ ### 🚀 **What's New in v2.2.8:**
81
+ - **📥 FileDownloader Module** - Native Android module for downloading files to public storage using MediaStore API
82
+ - **📂 FileManager Module** - Native Android module for opening Downloads folder with multiple fallback strategies
83
+ - **✅ Android 10+ Support** - Scoped Storage compliant with MediaStore API for Android 10+
84
+ - **✅ Legacy Support** - Backward compatible with Android 9 and below using legacy storage
85
+ - **✅ Smart Notifications** - Download completion notifications with "Open Folder" action
86
+ - **✅ Immediate Visibility** - Files are immediately visible in file managers after export
87
+ - **✅ Multi-Strategy Folder Opening** - Multiple fallback strategies for maximum device compatibility
88
+
38
89
  ## 🎉 Version 2.2.7 - iOS Codegen Fix & New Architecture Support!
39
90
 
40
91
  **Critical fix for React Native 0.79+ compatibility and iOS codegen integration!**
@@ -170,9 +221,11 @@ Starting November 1, 2025, Google Play will require apps to support 16KB page si
170
221
  - **Enhanced Features**: Additional functionality out of the box
171
222
  - **Easy Upgrade**: Minimal code changes required
172
223
 
173
- ## ✨ Features
224
+ ## ✨ Features - All FREE!
225
+
226
+ **📚 [Explore All Features in Documentation](https://euphonious-faun-24f4bc.netlify.app/docs/features/core-features)**
174
227
 
175
- ### Core Features
228
+ ### Core Features (FREE)
176
229
  * Read a PDF from URL, blob, local file or asset and can cache it
177
230
  * Display horizontally or vertically
178
231
  * Drag and zoom
@@ -180,7 +233,7 @@ Starting November 1, 2025, Google Play will require apps to support 16KB page si
180
233
  * Support password protected PDF
181
234
  * Jump to a specific page in the PDF
182
235
 
183
- ### 🚀 JSI Enhanced Features
236
+ ### 🚀 JSI Enhanced Features (FREE)
184
237
  * **Zero Bridge Overhead** - Direct JavaScript-to-Native communication
185
238
  * **Enhanced Caching** - Multi-level intelligent caching system
186
239
  * **Batch Operations** - Process multiple operations efficiently
@@ -193,167 +246,25 @@ Starting November 1, 2025, Google Play will require apps to support 16KB page si
193
246
  * **React Hooks** - Easy integration with `usePDFJSI` hook
194
247
  * **Enhanced Components** - Drop-in replacement with automatic JSI detection
195
248
 
249
+ ### 🎁 Advanced Features (100% FREE!)
250
+ * **📚 Bookmarks with 10 Colors** - Create, edit, delete bookmarks with custom colors and notes
251
+ * **📊 Reading Analytics** - Track reading sessions, progress, speed, and engagement scores
252
+ * **🖼️ Export to Images** - Export pages to PNG/JPEG with quality control
253
+ * **📝 Export to Text** - Extract text from PDFs with search capabilities
254
+ * **✂️ PDF Operations** - Split, merge, extract, rotate, and delete pages
255
+ * **🗜️ PDF Compression** - Reduce file sizes with 5 smart presets (EMAIL, WEB, MOBILE, PRINT, ARCHIVE)
256
+ * **🔍 Text Extraction** - Extract and search text with statistics and context
257
+ * **📥 File Management** (Android) - Download to public storage, open folders with MediaStore API
258
+ * **🎨 Professional UI Components** - Ready-to-use bookmark, analytics, and export components
259
+
260
+ **All features work immediately - no activation, no license keys, no restrictions!**
261
+
196
262
  ## 📱 Supported Platforms
197
263
 
198
264
  - ✅ **Android** (with full JSI acceleration - up to 80x faster)
199
265
  - ✅ **iOS** (enhanced bridge mode with smart caching and progressive loading)
200
266
  - ✅ **Windows** (standard bridge mode)
201
267
 
202
- ---
203
-
204
- ## 🎬 Pro Features - Coming Soon!
205
-
206
- > **Production-ready PDF manipulation features launching in the next few weeks!**
207
-
208
- ### Watch the Demo
209
-
210
- [![Pro Features Demo](https://img.youtube.com/vi/OmCUq9wLoHo/maxresdefault.jpg)](https://www.youtube.com/shorts/OmCUq9wLoHo)
211
-
212
- **[▶️ Watch on YouTube Shorts (60 seconds)](https://www.youtube.com/shorts/OmCUq9wLoHo)**
213
-
214
- *See bookmark management, export to images, PDF operations, and reading analytics in action!*
215
-
216
- ### 🚀 Features Launching Soon
217
-
218
- #### 📚 Advanced Bookmark Management
219
- - ✅ Create bookmarks with custom names, colors (10 options), and notes
220
- - ✅ Swipeable list with tap-to-navigate functionality
221
- - ✅ Current page highlighting with visual indicators
222
- - ✅ Swipe-to-delete with confirmation dialogs
223
- - ✅ Persistent storage with AsyncStorage
224
- - ✅ Jump directly to any bookmarked page
225
- - ✅ Edit bookmarks with full metadata support
226
-
227
- #### 🖼️ Export to Images
228
- - ✅ Export PDF pages to PNG or JPEG formats
229
- - ✅ Three quality levels: High (90%), Medium (75%), Low (50%)
230
- - ✅ Single page or batch export with progress tracking
231
- - ✅ Automatic download to public storage (MediaStore API)
232
- - ✅ Android notifications with "Open Folder" action
233
- - ✅ Timestamped filenames to prevent overwrites
234
- - ✅ Share single or multiple exported files
235
- - ✅ Files immediately visible in file manager
236
-
237
- #### ✂️ PDF Operations
238
- - ✅ Split PDF into multiple parts with custom page ranges
239
- - ✅ Extract specific pages to create new PDF
240
- - ✅ Merge multiple PDFs (framework ready)
241
- - ✅ All operations with real-time progress indicators
242
- - ✅ Auto-save to Downloads/[YourApp] folder
243
- - ✅ Success dialogs with "Open Folder" and "Share" buttons
244
- - ✅ Proper file naming with timestamps
245
-
246
- #### 📊 Reading Analytics
247
- - ✅ Session tracking (start/end times, duration)
248
- - ✅ Total time spent reading per PDF
249
- - ✅ Pages read counter and progress percentage
250
- - ✅ Reading speed calculation (pages/minute)
251
- - ✅ Complete session history
252
- - ✅ AsyncStorage persistence across app restarts
253
- - ✅ Beautiful analytics panel with real-time stats
254
-
255
- #### 🔧 Technical Excellence
256
- - ✅ **JSI Integration** - Leverages existing JSI for native performance
257
- - ✅ **MediaStore API** - Proper Android file management (Android 10+)
258
- - ✅ **Runtime Permissions** - Handles Android 13+ notification permissions
259
- - ✅ **Gesture-Based UI** - PanResponder for swipe gestures
260
- - ✅ **Material Design** - Professional UI components
261
- - ✅ **Error Handling** - Comprehensive error recovery
262
- - ✅ **TypeScript Support** - Full type definitions included
263
- - ✅ **Production Logging** - Debug-friendly with detailed logs
264
-
265
- ### 💰 Pricing
266
-
267
- | Plan | Target Users | India Price | Global Price | What's Included |
268
- |------|--------------|-------------|--------------|-----------------|
269
- | **Free** | Everyone | ₹0 | $0 | ✅ Basic PDF viewing<br>✅ All core features<br>✅ Community support |
270
- | **Indie** | Freelancers, Students | **₹2,999/year**<br>($36/year) | **$99/year** | ✅ All Pro features<br>✅ 1 app license<br>✅ Unlimited updates<br>✅ Email support<br>✅ Perfect for freelance projects |
271
- | **Startup** | Small Teams (2-10 devs) | **₹9,999/year**<br>($120/year) | **$299/year** | ✅ All Pro features<br>✅ Up to 5 apps<br>✅ Priority email support<br>✅ Team license<br>✅ Quarterly feature updates |
272
- | **Business** | Companies (10+ devs) | **₹24,999/year**<br>($300/year) | **$799/year** | ✅ All Pro features<br>✅ Unlimited apps<br>✅ Priority support (24h response)<br>✅ Custom feature development<br>✅ Source code access option |
273
-
274
- **🇮🇳 Regional Pricing Available** - Special rates for India, Southeast Asia, Latin America, and emerging markets.
275
-
276
- **🎁 Launch Offer:** First 50 customers get **30% OFF** any plan! Use code `EARLYBIRD30` at checkout.
277
-
278
- ### 🎯 Early Access
279
-
280
- **🚀 Launching in the next few weeks!**
281
-
282
- Want early access or have questions about Pro features?
283
-
284
- - 📧 **Email:** punithm300@gmail.com (Subject: "Pro Features Early Access")
285
- - ⭐ **Star this repo** to get notified when we launch
286
- - 🔔 **Watch** the repository for release announcements
287
- - 📦 **GitHub:** [react-native-enhanced-pdf](https://github.com/126punith/react-native-enhanced-pdf)
288
- - 📥 **NPM:** [react-native-pdf-jsi](https://www.npmjs.com/package/react-native-pdf-jsi)
289
-
290
- ### ✨ Why Choose Pro Features?
291
-
292
- > **Unlike other React Native PDF libraries**, we offer true production-grade features with professional UX patterns, proper file management, and enterprise-level performance.
293
-
294
- **What makes it different:**
295
-
296
- | Feature | react-native-pdf-jsi Pro | Other Libraries |
297
- |---------|--------------------------|-----------------|
298
- | **File Management** | MediaStore API (files visible immediately) | Cache only (files hidden) |
299
- | **Bookmarks** | Colors, notes, swipeable list | Basic or none |
300
- | **Export** | PNG/JPEG with quality control | Limited or none |
301
- | **PDF Operations** | Split, extract, merge with UI | None |
302
- | **Analytics** | Full session tracking & history | Page count only |
303
- | **Notifications** | Native Android notifications | None |
304
- | **Gestures** | Swipe-to-delete, tap-to-navigate | None |
305
- | **Share** | Batch sharing with dialogs | Basic or none |
306
-
307
- **Technical Advantages:**
308
- - 🚀 **Up to 80x faster** with existing JSI integration
309
- - 📱 **Proper file storage** - Files appear in Downloads immediately
310
- - 🎨 **Professional UI** - Material Design with animations
311
- - 🔔 **System integration** - Notifications, intents, MediaStore
312
- - 💪 **Battle-tested** - Production-ready code
313
- - 📖 **Complete docs** - Integration guides included
314
-
315
- ### 🎬 Feature Highlights from Demo
316
-
317
- **What you'll see in the [60-second demo](https://www.youtube.com/shorts/OmCUq9wLoHo):**
318
-
319
- 1. **Bookmark System** (0:00-0:20)
320
- - Create bookmark with name, color & notes
321
- - Swipeable list showing all bookmarks
322
- - Tap to jump to page 4 → 11 instantly
323
- - Swipe left to delete
324
-
325
- 2. **Export to Images** (0:20-0:35)
326
- - Export page as PNG (high quality)
327
- - Android notification appears
328
- - File visible in Downloads folder
329
- - Share exported image
330
-
331
- 3. **PDF Operations** (0:35-0:50)
332
- - Split PDF into 2 parts (pages 1-10, 11-21)
333
- - Files automatically downloaded
334
- - "Open Folder" button works
335
-
336
- 4. **Reading Analytics** (0:50-1:00)
337
- - Session tracking active
338
- - Progress percentage shown
339
- - Reading stats displayed
340
-
341
- ### 📢 Stay Updated
342
-
343
- **Coming Soon:**
344
- - 📖 Comprehensive documentation
345
- - 🎥 Tutorial videos
346
- - 📱 Example app repository
347
- - 🔌 Integration templates
348
- - 💬 Discord community
349
-
350
- **Follow the journey:**
351
- - 🐦 Twitter: Share your feedback!
352
- - ⭐ GitHub Stars help us reach more developers
353
- - 📧 Direct contact: punithm300@gmail.com
354
-
355
- ---
356
-
357
268
  ## 🛠 Installation
358
269
 
359
270
  ```bash
@@ -364,8 +275,12 @@ npm install react-native-pdf-jsi react-native-blob-util --save
364
275
  yarn add react-native-pdf-jsi react-native-blob-util
365
276
  ```
366
277
 
278
+ **📚 Need help?** Check our [complete installation guide](https://euphonious-faun-24f4bc.netlify.app/docs/getting-started/installation) with platform-specific instructions.
279
+
367
280
  ## 🚀 **Quick Start**
368
281
 
282
+ **📚 [See Quick Start Guide](https://euphonious-faun-24f4bc.netlify.app/docs/getting-started/quick-start)** for detailed instructions and more examples.
283
+
369
284
  ```jsx
370
285
  // Import the Pdf component from react-native-pdf-jsi
371
286
  const PdfModule = require('react-native-pdf-jsi');
@@ -436,7 +351,7 @@ react-native link react-native-pdf-jsi
436
351
 
437
352
  ### Windows installation
438
353
  <details>
439
- <summary>Windows details</summary>
354
+ <sumary>Windows details</summary>
440
355
 
441
356
  - Open your solution in Visual Studio 2019 (eg. `windows\yourapp.sln`)
442
357
  - Right-click Solution icon in Solution Explorer > Add > Existing Project...
@@ -500,6 +415,8 @@ protected List<ReactPackage> getPackages() {
500
415
 
501
416
  ## 📖 Usage
502
417
 
418
+ **📚 [View Complete Documentation](https://euphonious-faun-24f4bc.netlify.app/)** - Detailed guides, API reference, and working examples
419
+
503
420
  ### Basic Usage
504
421
 
505
422
  ```jsx
@@ -851,6 +768,213 @@ export default function AdvancedJSIExample() {
851
768
  }
852
769
  ```
853
770
 
771
+ ## 📥 **Android File Download & Management** (v2.2.8+)
772
+
773
+ The new Android native modules provide seamless file download and folder management capabilities with full Android 10+ Scoped Storage support.
774
+
775
+ ### FileDownloader Module
776
+
777
+ Download files to public storage with automatic MediaStore API integration for Android 10+ and legacy support for older versions.
778
+
779
+ #### **Features:**
780
+ - ✅ **MediaStore API Support** - Android 10+ Scoped Storage compliant
781
+ - ✅ **Legacy Storage** - Backward compatible with Android 9 and below
782
+ - ✅ **Instant Visibility** - Files appear immediately in file managers
783
+ - ✅ **Smart Notifications** - Download completion notifications with "Open Folder" action
784
+ - ✅ **Multiple Formats** - Supports PDF, PNG, and JPEG files
785
+
786
+ #### **Usage:**
787
+
788
+ ```jsx
789
+ import { NativeModules } from 'react-native';
790
+ const { FileDownloader } = NativeModules;
791
+
792
+ // Download a file to public Downloads/PDFDemoApp folder
793
+ const downloadFile = async () => {
794
+ try {
795
+ const sourcePath = '/path/to/cached/file.pdf';
796
+ const fileName = 'my-document.pdf';
797
+ const mimeType = 'application/pdf'; // or 'image/png', 'image/jpeg'
798
+
799
+ const publicPath = await FileDownloader.downloadToPublicFolder(
800
+ sourcePath,
801
+ fileName,
802
+ mimeType
803
+ );
804
+
805
+ console.log('✅ File downloaded to:', publicPath);
806
+ // Android 10+: /storage/emulated/0/Download/PDFDemoApp/my-document.pdf
807
+
808
+ } catch (error) {
809
+ console.error('❌ Download failed:', error);
810
+ }
811
+ };
812
+ ```
813
+
814
+ #### **API:**
815
+
816
+ ```typescript
817
+ FileDownloader.downloadToPublicFolder(
818
+ sourcePath: string, // Path to source file in app's cache/internal storage
819
+ fileName: string, // Desired file name
820
+ mimeType: string // MIME type: 'application/pdf', 'image/png', 'image/jpeg'
821
+ ): Promise<string> // Returns public file path
822
+ ```
823
+
824
+ #### **How It Works:**
825
+ - **Android 10+**: Uses MediaStore API to create entries in the Downloads collection with proper visibility
826
+ - **Android 9 and below**: Uses legacy `Environment.getExternalStoragePublicDirectory()` with media scanner
827
+ - **Automatic folder creation**: Creates `Downloads/PDFDemoApp` folder if it doesn't exist
828
+ - **Progress notifications**: Shows notification with "Open Folder" action when download completes
829
+
830
+ ### FileManager Module
831
+
832
+ Open the Downloads folder with multiple fallback strategies for maximum compatibility across Android devices.
833
+
834
+ #### **Features:**
835
+ - ✅ **Multi-Strategy Opening** - 4 different fallback strategies
836
+ - ✅ **Maximum Compatibility** - Works with various file manager apps
837
+ - ✅ **Graceful Degradation** - Automatically tries next strategy if one fails
838
+ - ✅ **User-Friendly** - Opens specific folder or general file manager
839
+
840
+ #### **Usage:**
841
+
842
+ ```jsx
843
+ import { NativeModules, Alert } from 'react-native';
844
+ const { FileManager } = NativeModules;
845
+
846
+ // Open Downloads/PDFDemoApp folder
847
+ const openFolder = async () => {
848
+ try {
849
+ await FileManager.openDownloadsFolder();
850
+ console.log('✅ Folder opened successfully');
851
+ } catch (error) {
852
+ // All strategies failed - no file manager available
853
+ Alert.alert(
854
+ 'Info',
855
+ 'Please check Downloads/PDFDemoApp folder in your file manager'
856
+ );
857
+ }
858
+ };
859
+ ```
860
+
861
+ #### **API:**
862
+
863
+ ```typescript
864
+ FileManager.openDownloadsFolder(): Promise<boolean>
865
+ ```
866
+
867
+ #### **Fallback Strategies:**
868
+ 1. **Strategy 1**: Opens specific `Downloads/PDFDemoApp` folder via DocumentsUI
869
+ 2. **Strategy 2**: Opens system Downloads app
870
+ 3. **Strategy 3**: Opens generic Files app
871
+ 4. **Strategy 4**: Shows file picker to let user choose file manager
872
+
873
+ ### Complete Example: Export and Download PDF Pages
874
+
875
+ ```jsx
876
+ import React, { useState } from 'react';
877
+ import { View, Button, Alert, NativeModules } from 'react-native';
878
+
879
+ const { PDFExporter, FileDownloader, FileManager } = NativeModules;
880
+
881
+ const ExportAndDownload = () => {
882
+ const [exporting, setExporting] = useState(false);
883
+
884
+ const exportAndDownloadPages = async (pdfPath, pageNumbers) => {
885
+ setExporting(true);
886
+
887
+ try {
888
+ // Step 1: Export pages to images
889
+ const exportedImages = [];
890
+ for (let page of pageNumbers) {
891
+ const imagePath = await PDFExporter.exportPageToImage(
892
+ pdfPath,
893
+ page - 1, // Convert to 0-indexed
894
+ {
895
+ format: 'png',
896
+ quality: 0.9,
897
+ scale: 2.0
898
+ }
899
+ );
900
+ exportedImages.push(imagePath);
901
+ }
902
+
903
+ // Step 2: Download to public storage
904
+ const downloadedFiles = [];
905
+ for (let i = 0; i < exportedImages.length; i++) {
906
+ const publicPath = await FileDownloader.downloadToPublicFolder(
907
+ exportedImages[i],
908
+ `page-${pageNumbers[i]}.png`,
909
+ 'image/png'
910
+ );
911
+ downloadedFiles.push(publicPath);
912
+ }
913
+
914
+ setExporting(false);
915
+
916
+ // Step 3: Show success and offer to open folder
917
+ Alert.alert(
918
+ '✅ Export Complete',
919
+ `${downloadedFiles.length} pages saved to Downloads/PDFDemoApp`,
920
+ [
921
+ { text: 'Done', style: 'cancel' },
922
+ {
923
+ text: 'Open Folder',
924
+ onPress: async () => {
925
+ try {
926
+ await FileManager.openDownloadsFolder();
927
+ } catch (e) {
928
+ Alert.alert('Info', 'Check Downloads/PDFDemoApp folder');
929
+ }
930
+ }
931
+ }
932
+ ]
933
+ );
934
+
935
+ } catch (error) {
936
+ setExporting(false);
937
+ Alert.alert('Export Failed', error.message);
938
+ }
939
+ };
940
+
941
+ return (
942
+ <View>
943
+ <Button
944
+ title={exporting ? 'Exporting...' : 'Export Pages 1-3'}
945
+ onPress={() => exportAndDownloadPages('/path/to/file.pdf', [1, 2, 3])}
946
+ disabled={exporting}
947
+ />
948
+ </View>
949
+ );
950
+ };
951
+
952
+ export default ExportAndDownload;
953
+ ```
954
+
955
+ ### Android Permissions
956
+
957
+ For Android 10+ (API 29+), the MediaStore API doesn't require `WRITE_EXTERNAL_STORAGE` permission for adding files to public Downloads folder. However, for Android 9 and below, you may need to add:
958
+
959
+ ```xml
960
+ <!-- android/app/src/main/AndroidManifest.xml -->
961
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="28" />
962
+ ```
963
+
964
+ ### Customization
965
+
966
+ You can customize the folder name by modifying the `FOLDER_NAME` constant in the native modules:
967
+
968
+ ```java
969
+ // android/src/main/java/org/wonday/pdf/FileDownloader.java
970
+ private static final String FOLDER_NAME = "YourAppName"; // Change this
971
+ ```
972
+
973
+ ```java
974
+ // android/src/main/java/org/wonday/pdf/FileManager.java
975
+ private static final String FOLDER_NAME = "YourAppName"; // Change this
976
+ ```
977
+
854
978
  ## 🛡️ **ProGuard Configuration (Required for Production)**
855
979
 
856
980
  **IMPORTANT**: For production builds, you MUST add ProGuard rules to prevent obfuscation of JSI classes. Without these rules, your app will crash in release mode.
@@ -979,10 +1103,10 @@ This package is not available in the [Expo Go](https://expo.dev/client) app. Lea
979
1103
  <summary>FAQ details</summary>
980
1104
 
981
1105
  Q1. After installation and running, I can not see the pdf file.
982
- A1: maybe you forgot to execute ```react-native link``` or it does not run correctly.
1106
+ A1: maybe you forgot to excute ```react-native link``` or it does not run correctly.
983
1107
  You can add it manually. For detail you can see the issue [`#24`](https://github.com/wonday/react-native-pdf/issues/24) and [`#2`](https://github.com/wonday/react-native-pdf/issues/2)
984
1108
 
985
- Q2. When running, it shows ```'Pdf' has no propType for native prop RCTPdf.accessibilityLabel of native type 'String'```
1109
+ Q2. When running, it shows ```'Pdf' has no propType for native prop RCTPdf.acessibilityLabel of native type 'String'```
986
1110
  A2. Your react-native version is too old, please upgrade it to 0.47.0+ see also [`#39`](https://github.com/wonday/react-native-pdf/issues/39)
987
1111
 
988
1112
  Q3. When I run the example app I get a white/gray screen / the loading bar isn't progressing .
@@ -1625,10 +1749,10 @@ export default function LazyLoadingExample() {
1625
1749
  | style | object | {backgroundColor:"#eee"} | support normal view style, you can use this to set border/spacing color... | ✔ | ✔ | ✔ | <3.0
1626
1750
  | progressContainerStyle | object | {backgroundColor:"#eee"} | support normal view style, you can use this to set border/spacing color... | ✔ | ✔ | ✔ | 6.9.0 |
1627
1751
  | renderActivityIndicator | (progress) => Component | <ProgressBar/> | when loading show it as an indicator, you can use your component | ✔ | ✔ | ✖ | <3.0 |
1628
- | enableAntialiasing | bool | true | improve rendering a little bit on low-res screens, but may cause some problems on Android 4.4, so add a switch | ✖ | ✔ | ✖ | <3.0 |
1752
+ | enableAntialiasing | bool | true | improve rendering a little bit on low-res screens, but maybe course some problem on Android 4.4, so add a switch | ✖ | ✔ | ✖ | <3.0 |
1629
1753
  | enablePaging | bool | false | only show one page in screen | ✔ | ✔ | ✔ | 5.0.1 |
1630
1754
  | enableRTL | bool | false | scroll page as "page3, page2, page1" | ✔ | ✖ | ✔ | 5.0.1 |
1631
- | enableAnnotationRendering | bool | true | enable rendering annotation, notice: iOS only supports initial setting, not real-time changing | ✔ | ✔ | ✖ | 5.0.3 |
1755
+ | enableAnnotationRendering | bool | true | enable rendering annotation, notice:iOS only support initial setting,not support realtime changing | ✔ | ✔ | ✖ | 5.0.3 |
1632
1756
  | enableDoubleTapZoom | bool | true | Enable double tap to zoom gesture | ✔ | ✔ | ✖ | 6.8.0 |
1633
1757
  | trustAllCerts | bool | true | Allow connections to servers with self-signed certification | ✔ | ✔ | ✖ | 6.0.? |
1634
1758
  | singlePage | bool | false | Only show first page, useful for thumbnail views | ✔ | ✔ | ✔ | 6.2.1 |
@@ -1644,7 +1768,7 @@ export default function LazyLoadingExample() {
1644
1768
 
1645
1769
  | parameter | Description | default | iOS | Android | Windows |
1646
1770
  | ------------ | ----------- | ------- | --- | ------- | ------- |
1647
- | uri | pdf source, see the following for detail.| required | ✔ | ✔ | ✔ |
1771
+ | uri | pdf source, see the forllowing for detail.| required | ✔ | ✔ | ✔ |
1648
1772
  | cache | use cache or not | false | ✔ | ✔ | ✖ |
1649
1773
  | cacheFileName | specific file name for cached pdf file | SHA1(uri) result | ✔ | ✔ | ✖ |
1650
1774
  | expiration | cache file expired seconds (0 is not expired) | 0 | ✔ | ✔ | ✖ |
@@ -1734,11 +1858,20 @@ MIT License - see [LICENSE](LICENSE) file for details.
1734
1858
 
1735
1859
  ## 📞 Support
1736
1860
 
1737
- For issues and questions:
1738
- - GitHub Issues: [react-native-enhanced-pdf](https://github.com/126punith/react-native-enhanced-pdf)
1739
- - Performance Issues: Include JSI stats and performance history
1740
- - Build Issues: Include CMake logs and Android NDK version
1741
- - Contact: punithm300@gmail.com
1861
+ **📚 Documentation Website**: https://euphonious-faun-24f4bc.netlify.app/
1862
+
1863
+ Get help with:
1864
+ - **📖 Complete Guides**: https://euphonious-faun-24f4bc.netlify.app/docs/getting-started/installation
1865
+ - **🔧 API Reference**: https://euphonious-faun-24f4bc.netlify.app/docs/api/pdf-component
1866
+ - **💡 Working Examples**: https://euphonious-faun-24f4bc.netlify.app/docs/examples/basic-viewer
1867
+ - **🐛 GitHub Issues**: https://github.com/126punith/react-native-enhanced-pdf/issues
1868
+ - **💬 Discussions**: https://github.com/126punith/react-native-enhanced-pdf/discussions
1869
+ - **📧 Email**: punithm300@gmail.com
1870
+
1871
+ For bug reports, include:
1872
+ - JSI stats and performance history
1873
+ - CMake logs and Android NDK version
1874
+ - Platform and React Native version
1742
1875
 
1743
1876
  ---
1744
1877
 
@@ -1747,4 +1880,6 @@ For issues and questions:
1747
1880
  *Transform your PDF viewing experience with enterprise-grade performance and reliability.*
1748
1881
 
1749
1882
  **v2.2.7 - iOS Codegen Fix & New Architecture Support**
1750
- **Copyright (c) 2025-present, Punith M (punithm300@gmail.com). All rights reserved.**
1883
+ **Copyright (c) 2025-present, Punith M (punithm300@gmail.com). Enhanced PDF JSI Integration. All rights reserved.**
1884
+
1885
+ *Original work Copyright (c) 2017-present, Wonday (@wonday.org). All rights reserved.*