
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@foxitsoftware/react-native-foxitpdf
Advanced tools
react-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.
First, download the library from npm and install inside your current project folder
npm install @foxitsoftware/react-native-foxitpdf --save
Link the project to the library automatically
react-native link @foxitsoftware/react-native-foxitpdf
#import "FoxitRDK/FSPDFObjC.h"
didFinishLaunchingWithOptions
function, add the following lines:NSString *sn = @"xxx";
NSString *key = @"xxx";
FSErrorCode eRet = [FSLibrary initialize:sn key:key];
if (FSErrSuccess != eRet) {
return NO;
}
allprojects {
repositories {
...
flatDir {
dirs project(':@foxitsoftware_react-native-foxitpdf').file("$rootDir/libs")
}
}
}
uses-permission
tag outside application
tags in AndroidManifest.xml
.<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="your package name">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.RUN_INSTRUMENTATION"/>
<uses-permission android:name="android.permission.CAMERA" />
<application .../>
</manifest>
sn
, key
, and PDFReaderActivity
inside application
tags in AndroidManifest.xml
. You may find your sn and key in Foxit PDF SDK for Android download package folder.<application
...
tools:replace="android:allowBackup,icon,theme,label,name">
<meta-data
android:name="foxit_sn"
android:value="xxx"/>
<meta-data
android:name="foxit_key"
android:value="xxx"/>
<activity
android:name="com.foxitreader.PDFReaderActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:screenOrientation="fullSensor"/>
...
android:allowBackup
in tools:replace
inside application
tags and xmlns:tools="http://schemas.android.com/tools"
in root manifest
element.<manifest
...
xmlns:tools="http://schemas.android.com/tools">
...
<application
...
tools:replace="android:allowBackup,icon,theme,label,name">
...
</application>
...
</manifest>
In your App.js file, you can import the component using the following code:
import FoxitPDF from '@foxitsoftware/react-native-foxitpdf';
or
var FoxitPDF = require('@foxitsoftware/react-native-foxitpdf');
Once the component is initialized, call the function below to open the PDF Reader:
FoxitPDF.openPDF('sample.pdf');
In the openPDF function parameter, add the path to the file you wish to open.
If you are using iOS version: Add the name of the PDF file, but make sure it is located under app Document folder
If you are using Android version: Add the file path location of the PDF inside your project.
For example, if the file is in your sdcard folder: FoxitPDF.openPDF('/sdcard/0/download/xxx.pdf')
Copyright (c) 2018 Foxit Corporation
Licensed under the The MIT License (MIT) (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://raw.githubusercontent.com/foxitsoftware/react-native-foxitpdf/master/LICENSE
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
FAQs
React Native Foxit PDF view for iOS + Android
The npm package @foxitsoftware/react-native-foxitpdf receives a total of 59 weekly downloads. As such, @foxitsoftware/react-native-foxitpdf popularity was classified as not popular.
We found that @foxitsoftware/react-native-foxitpdf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 20 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.