Trial and Licensing ​
Trial Evaluation ​
Developers can apply for a trial or download instructions through the Foxit Developer Hub to obtain the Foxit PDF SDK for Web trial package for evaluation, or contact Foxit technical support and sales. The trial edition provides the same core capabilities as the licensed edition, but typically includes the following restrictions:
- The trial period is 30 days.
- Generated, saved, or exported PDF files may include a trial watermark.
When the trial period ends, contact the Foxit sales team to purchase a production license if you wish to continue using Foxit PDF SDK for Web in your project.
WARNING
Without authorization from Foxit Software Incorporated, you must not distribute any documentation, sample code, or source code from the Foxit PDF SDK package to third parties.
Configuring License Information ​
In web scenarios, pass valid license information through the jr configuration when creating a PDFViewCtrl.PDFViewer or UIExtension.PDFUI instance.
License information in the trial or production package is usually located in examples/license-key.js and includes:
licenseSNlicenseKey
Depending on your deployment model, you can also place these values in a separate config file, environment variables, or build scripts and inject them when the page loads.
Licensing with PDFViewCtrl ​
html
<script src="./examples/license-key.js"></script>
<script src="./lib/PDFViewCtrl.full.js"></script>
<script>
var pdfViewer = new PDFViewCtrl.PDFViewer({
libPath: "./lib",
jr: {
licenseSN: licenseSN,
licenseKey: licenseKey,
},
});
pdfViewer.init("#pdf-viewer");
</script>Licensing with UIExtension ​
html
<script src="./examples/license-key.js"></script>
<script src="./lib/UIExtension.full.js"></script>
<script>
var pdfui = new UIExtension.PDFUI({
viewerOptions: {
libPath: "./lib",
jr: {
licenseSN: licenseSN,
licenseKey: licenseKey,
},
},
renderTo: "#pdf-ui",
});
</script>Optional: Protected Front-End License ​
To reduce the risk of exposing production license credentials in the browser, use the server/license-protect tool in the SDK package to encrypt licenseSN and licenseKey on the server and generate a protected license string for the client.
When generating a protected license, you can also configure an allowed host whitelist (hosts) and validity window (begin / end, millisecond timestamps) to tighten where the license can be used.
Pass the protected license via jr.l. When using jr.l, you do not need jr.licenseSN and jr.licenseKey:
js
const pdfViewer = new PDFViewCtrl.PDFViewer({
libPath: "./lib",
jr: {
l: "Protected license string",
},
});Note
- If license information is incorrect, the viewer may fail license validation when loading documents or enabling related capabilities.
- Reading license information from
examples/license-key.jsis suitable for local trials and quick validation; for production, inject credentials through a controlled configuration path and avoid committing production licenses to public repositories. - If your license includes module-level capability controls, available features depend on the license content.