{"id":15739664,"url":"https://github.com/foxitsoftware/react-native-foxitpdf","last_synced_at":"2025-08-01T00:06:17.876Z","repository":{"id":49378669,"uuid":"134212723","full_name":"foxitsoftware/react-native-foxitpdf","owner":"foxitsoftware","description":"React Native wrapper for Foxit PDF SDK for iOS and Android","archived":false,"fork":false,"pushed_at":"2025-05-30T14:00:59.000Z","size":1721,"stargazers_count":18,"open_issues_count":7,"forks_count":5,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-06-30T15:03:07.594Z","etag":null,"topics":["android","ios","javascript","react","react-native"],"latest_commit_sha":null,"homepage":"https://developers.foxitsoftware.com/","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxitsoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-05-21T03:22:23.000Z","updated_at":"2025-05-30T13:56:03.000Z","dependencies_parsed_at":"2023-11-27T11:26:34.771Z","dependency_job_id":"4358168f-d81a-4ee8-9fb3-9445cec4d755","html_url":"https://github.com/foxitsoftware/react-native-foxitpdf","commit_stats":{"total_commits":158,"total_committers":10,"mean_commits":15.8,"dds":0.620253164556962,"last_synced_commit":"5bbd11d8ee2d4b00e964406b92127220a8a27f07"},"previous_names":["andrew9032/react-native-foxit"],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/foxitsoftware/react-native-foxitpdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Freact-native-foxitpdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Freact-native-foxitpdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Freact-native-foxitpdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Freact-native-foxitpdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxitsoftware","download_url":"https://codeload.github.com/foxitsoftware/react-native-foxitpdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxitsoftware%2Freact-native-foxitpdf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265507727,"owners_count":23779011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","ios","javascript","react","react-native"],"created_at":"2024-10-04T02:05:37.737Z","updated_at":"2025-08-01T00:06:17.823Z","avatar_url":"https://github.com/foxitsoftware.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-foxitpdf [![npm version](https://img.shields.io/npm/v/@foxitsoftware/react-native-foxitpdf.svg?style=flat)](https://www.npmjs.com/package/@foxitsoftware/react-native-foxitpdf)\n\nreact-native-foxitpdf is Foxit's first React Native PDF component for iOS and Android. It uses Foxit PDF SDK for Android/iOS technology to view, render and edit PDFs easily, and it can open pdf files on local or url.\n\n- [Installation](#installation)\n- [Integration for iOS](#integration-for-ios)\n- [Integration for Android](#integration-for-android)\n- [General Usage](#general-usage)\n- [API Reference](#api-reference)\n- [Versions](#versions)\n- [License](#license)\n\n## Installation\n\nFirst, download the library from npm and install inside your current project folder\n\n```\nnpm install @foxitsoftware/react-native-foxitpdf\n```\n\n## Integration for iOS\n\n1. Unzip Foxit PDF SDK for iOS and copy `libs` folder into the component’s `\u003cPROJECT_ROOT\u003e/ios` folder.\n```\n\u003cPROJECT_ROOT\u003e/ios/libs/\u003cframeworks\u003e\n```\nPlease use foxitpdfsdk_(version_no)_ios.zip from https://developers.foxitsoftware.com/pdf-sdk/ios/\n\n2. Add `FoxitPDF` to `\u003cPROJECT_ROOT\u003e/ios/Podfile` \n```ruby\npod 'FoxitPDF', :path=\u003e'./libs/FoxitPDF.podspec'\n```\n3.\n```\ncd \u003cPROJECT_ROOT\u003e/ios \u0026\u0026 pod install\n```\n\n## Integration for Android\n\n1. Download foxit_mobile_pdf_sdk_android_en.zip from [https://developers.foxitsoftware.com/pdf-sdk/android/] (Please use the latest version)\n\n2. Unzip `foxitpdfsdk_(version_no)_android.zip` and copy libs folder into the component android folder.\n\u003cPROJECT_ROOT\u003e/android/\n\n3. In your root `android/build.gradle`:\n```diff\n    buildscript {\n        ...\n    }\n        \n+   allprojects {\n+       repositories {\n+           flatDir {\n+               dirs project(':foxitsoftware_react-native-foxitpdf').file(\"$rootDir/libs\")           \n+           }\n+           maven {\n+                url 'https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1'\n+           }\n+        }\n+   }\n```  \n\n4. Add `tools:replace` to your `android/app/src/main/AndroidManifest.xml`.\n```diff\n   \u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n+             xmlns:tools=\"http://schemas.android.com/tools\"\n              package=\"com.foxitreact\"\u003e\n   \n       \u003cuses-permission android:name=\"android.permission.INTERNET\"/\u003e\n   \n       \u003capplication\n           android:name=\".MainApplication\"\n           android:allowBackup=\"false\"\n           android:icon=\"@mipmap/ic_launcher\"\n           android:label=\"@string/app_name\"\n           android:roundIcon=\"@mipmap/ic_launcher_round\"\n           android:theme=\"@style/AppTheme\"\n+          tools:replace=\"android:allowBackup,icon,theme,label,name\"\u003e\n           \n           \u003cactivity\n               android:name=\".MainActivity\"\n               android:configChanges=\"keyboard|keyboardHidden|orientation|screenSize|uiMode\"\n               android:exported=\"true\"\n               android:label=\"@string/app_name\"\n               android:launchMode=\"singleTask\"\n               android:windowSoftInputMode=\"adjustResize\"\u003e\n               \u003cintent-filter\u003e\n                   \u003caction android:name=\"android.intent.action.MAIN\"/\u003e\n                   \u003ccategory android:name=\"android.intent.category.LAUNCHER\"/\u003e\n               \u003c/intent-filter\u003e\n           \u003c/activity\u003e\n       \u003c/application\u003e\n   \u003c/manifest\u003e\n```\n\n## General Usage\n\nIn your App.tsx file, you can import the component using the following code:\n\n1.Import FoxitPDF\n```js\nimport FoxitPDF from '@foxitsoftware/react-native-foxitpdf';\n```\n\n2.Initialize the library.  The `foxit_sn` is `rdk_sn`, `foxit_key` is `rdk_key` and they can be found in the libs folder of Foxit PDF SDK.\n```js\nFoxitPDF.initialize(\"foxit_sn\",\"foxit_key\");\n```\n\n3.Once the component is initialized, call the function below to open document from local path:\n```js\nFoxitPDF.openDocument('sample.pdf');\n```\n\nIn the openDocument function parameter, add the path to the file you wish to open.\n\nIf you are using iOS version: Add the name of the PDF file, but make sure it is located under app Document folder\n\nIf you are using Android version: `Please input the absolute path of the file in the devices, e.g., FoxitPDF.openDocument('/storage/emulated/0/xxx/xxx.pdf')`\n\n\n4.Call the function below to open document from URL：\n```js\nFoxitPDF.openDocFromUrl(url);\n```\ne.g.\n```js\nFoxitPDF.openDocFromUrl('https://developers.foxitsoftware.com/resources/pdf-sdk/FoxitPDFSDK_QuickGuide(PDFium).pdf');\n```\n\n\nIn `App.tsx`:\n```javascript\nimport React, { Component } from 'react';\nimport {\n  Platform,\n  StyleSheet,\n  Text,\n  View,\n  NativeModules,\n  TouchableOpacity,\n} from 'react-native';\n\nimport FoxitPDF from '@foxitsoftware/react-native-foxitpdf';\n\ntype Props = {};\nexport default class App extends Component\u003cProps\u003e {\n\n  constructor(props) {\n     super(props);\n\n     FoxitPDF.initialize(\"foxit_sn\",\"foxit_key\");\n  }\n\n  onPress() {\n   //open doc from local path\n    FoxitPDF.openDocument('/sample.pdf');\n    \n    // open doc from url\n    //FoxitPDF.openDocFromUrl('');\n  }\n\n  render() {\n    return (\n      \u003cView style={styles.container}\u003e\n        \u003cTouchableOpacity onPress={this.onPress}\u003e\n          \u003cText\u003eOpen PDF\u003c/Text\u003e\n        \u003c/TouchableOpacity\u003e\n      \u003c/View\u003e\n    );\n  }\n}\n\nconst styles = StyleSheet.create({\n  container: {\n    flex: 1,\n    justifyContent: 'center',\n    alignItems: 'center',\n    backgroundColor: '#F5FCFF',\n  },\n});\n```\n\n## API Reference\n**Initialize Foxit PDF SDK**\n\n\tFoxitPDF.initialize(String, String); // foxit_sn and foxit_key\n\n**Open a pdf document from local**\n\n\tFoxitPDF.openDocument(String, String) // path and password\n\n**Open a pdf document from url**\n\n\tFoxitPDF.openDocFromUrl(String, String) // path and password\n\t\n## Versions\n\u003e[v9.0.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/V9.0.0)\n\n\u003e[v8.4.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/v8.4.0)\n\n\u003e[v8.3.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/V8.3.0)\n\n\u003e[v8.2.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/V8.2.0)\n\n\u003e[v8.1.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/V8.1.0)\n\n\u003e[v8.0.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/v8.0)\n\n\u003e[v7.5.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/7.5)\n\n\u003e[v7.4.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/7.4)\n\n\u003e[v7.3.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/7.3)\n\n\u003e[v7.2.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/7.2)\n\n\u003e[v7.1.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/7.1)\n\n\u003e[v7.0.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/7.0)\n\n\u003e[v6.4.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/6.4.0)\n\n\u003e[v6.3.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/6.3)\n\n\u003e[v6.2.1](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/6.2.1)\n\n\u003e[v6.2](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/6.2)\n\n\u003e[v6.1](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/6.1)\n\n\u003e[v6.0](https://github.com/foxitsoftware/react-native-foxitpdf/tree/release/6.0)\n\n## License\n\n     Copyright (c) 2023 Foxit Corporation\n\n     Licensed under the The MIT License (MIT) (the \"License\");\n     you may not use this file except in compliance with the License.\n     You may obtain a copy of the License at\n\n        https://raw.githubusercontent.com/foxitsoftware/react-native-foxitpdf/master/LICENSE\n\n     Unless required by applicable law or agreed to in writing, software\n     distributed under the License is distributed on an \"AS IS\" BASIS,\n     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n     See the License for the specific language governing permissions and\n     limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxitsoftware%2Freact-native-foxitpdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxitsoftware%2Freact-native-foxitpdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxitsoftware%2Freact-native-foxitpdf/lists"}