Insights, tutorials, and updates from the Foxit PDF SDK engineering team.
If you experience slow page loading with PDF SDK for Web, use Chrome Dev Tools to inspect your Network activity to check if the slowness is related to repeat file loading. If so, you should consider using a cache policy on static assets to optimize repeat page load speed. PDF SDK for Web allows a temporary and permanent cache on files. The cache code sample is available at ..\examples\PDFViewCtrl\service-worker in the Web SDK package.
preloadJRWorker is Foxits Web SDK worker thread to perform tasks in the background and with v7, major improvements have been made. Read more about it here.
PDF is one of the most ubiquitous file formats today. Whether you are submitting a resume for your next job, generating a financial report for your boss, or publishing a scientific whitepaper – PDF is the defacto format. Because it’s so widely used, you’re likely to run across many situations as a software developer where [...]
Foxit PDF SDK for Web has a huge range of custom fonts available with the Foxit package. Click here for more information on custom fonts with Foxit. Foxit PDF SDK for Web has a huge range of custom fonts available with the package. You can customize as much as you wish by using the 2 sample codes below. Setting up the font Path var pdfui = new PDFUI({ viewerOptions: { libPath: '../../../lib', preloadJR: true, jr: { licenseSN:"", LicenseKey:"", fontPath:"../external/brotli" } })
Foxit PDF SDK for Web has adopted the i18Next international framework to implement additional language support. Find out more here. Internalization Resources Foxit PDF SDK for Web has adopted the i18Next international framework to implement additional language support. The localization resources are stored at ~lib\locales. Each folder contains two resource files – the ui_.json and viewer_.json. The first one is for the advanced web viewer demo, and the other is for the basic web viewer demo.
Click here to find out more on how Foxit PDF SDK for Web can help customize language resources for your application.Assumption Assume you have an assets/in your website root directory, where you will configure the language resources. Let’s call this path as websiteRoot/assets/.
PDFs are among the most widely used formats for business documents, so properly securing them is a critical part of many workflows. If you’re building a web application that needs to open PDFs, you’ll probably run into a situation where you have to deal with password-protected documents. Building this functionality yourself will require a lot [...]
Foxit PDF SDK for Web comes with lots of customization options and you can now edit the loading icon and text. Click here to find out more. Foxit PDF SDK for Web comes with lots of customization options and you can now edit the loading icon and text. This icon/text refers to the time between UI initialization and document display. Follow the guidelines below to update this icon and text, or you can have neither a loading icon/text if you wish. Code Snippet:
Click here to find out more on how to add annotations through Foxit PDF SDK for Web. Add an annotation on a given page Programmatically add an annotation var pdfviewer = await pdfui.getPDFViewer();var pdfdoc = await pdfviewer.getCurrentPDFDoc();var page = await pdfdoc.getPageByIndex(0);var json = {type:’square’,rect:{left:98,right:200,top:500,bottom:450},contents:’this is a rectangle’,color: 0x008080,borderInfo:{width:15}};await page.addAnnot(json)
Getting paid is one of the most critical functions in any business, and digital invoices are becoming standard practice in a wide swath of industries. With this in mind, web application developers are often tasked with generating and sending PDF invoices programmatically. Whether you’re automating the invoice generation and notification process or building a GUI [...]