![]() development/webpackĬreate and configure the following files in ReacJS: You can also directly duplicate the files to. development/webpack folder:įor the configuration details, refer to the counterpart files in. npm install webpack webpack-cli terser-webpack-plugin -save-devĬreate and configure the following 3 files in the.Setup Webpack and Babel for our React app Let's call the root folder of your existing React project and FoxitPDFSDK for Web as ReactJS and SDK. This integration assumes you have React app created with Webpack and Babel. dist & http-server -p 8080 Integrate FoxitPDFSDK for Web into existing React.js project Import * as UIExtension from import filePropertyAddon from import multiMediaAddon from import passwordProtectAddon from import redactionAddon from import pathObjectsAddon from import printAddon from import fullScreenAddon from import importFormAddon from import exportFormAddon from import undoRedoAddon from import textObjectAddon from import thumbnailAddon from import formDesignerAddon from import formToSheetAddon from import readAloudAddon from import hContinuesAddon from import RecognitionFormAddon from import pageTemplateAddon from import xfaFormAddon from Īnd pass addons to the PDFUI constructor:Ĭd. You should open components/PDFViewer/index.js, and referece addons as shown below: This method was used by default in past versions before version 7.2. This (#Addons reference methods comparison) will help you to better understand the difference of the three ways and make a choice.If you need to run multiple instances, see the third method. ![]() Here we introduce three ways to reference SDK addons for Anguar project, you may choose one of them based on your needs. You may want to check out Addons for detailed introductions. If you are integrating FoxitPDFSDK for Web into your existing React project, you should read this section before continue. What we need to do is to copy the external folder in the SDK to the app/assets folder so that the special font can be rendered normally. In this example, you can refer to the fontPath configuration in app/preload.js. If some text in a PDF document requires a specified font to be rendered correctly, you need to specify a font loading path during initialization. ![]() You can find the license information at SDK/examples/ Reference the fonts Place the license-key.js into ReacJS/app. This step will download all dependencies into node_modules folder. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |