Developer Posts

How to Customize Language Resources with Foxit PDF SDK for Web

by Conor Smith | September 12, 2020
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/. Configuration Copy lib/locals inside the SDK to websiteRoot/assets/. Set up the I18N path for loading resources. new UIExtension.PDFUI({ i18n: { absolutePath: 'websiteRoot/assets/locals' }, // the other options... }); Add more languages Create a new […]
Keep reading Keep reading

How to Save PDFs back to a Web Server with PDF SDK for Web

by Conor Smith | September 10, 2020
Foxit PDF SDK for Web allows you save PDF files to a web server easily with a short code. Please add the code below to do so: var FRAGMENT_ACTION = UIExtension.UIConsts.FRAGMENT_ACTIONar FRAGMENT_ACTION = UIExtension.UIConsts.FRAGMENT_ACTION var pdfui = new PDFUI({ fragments: [{ target: 'download-file-button', action: FRAGMENT_ACTION.AFTER, template: '<xbutton icon-class="customers-save-button-icon-css-class" name="upload-to-server-button"></xbutton>', config: [{ target: 'upload-to-server-button', callback: function() { […]
Keep reading Keep reading

How to Change the Loading Icon & Text with PDF SDK for Web

by Conor Smith | September 8, 2020
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 […]
Keep reading Keep reading

How to Add Annotations with Foxit PDF SDK for Web

by Conor Smith | September 6, 2020
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) Add a group annotation on a given page UI Programmatically add group annotations NO var pdfviewer = await pdfui.getPDFViewer();var pdfdoc = […]
Keep reading Keep reading

How to Show the First Third of a PDF with Foxit PDF SDK for Web

by Conor Smith | August 25, 2020
Often times you need to show just certain parts of a PDF. This is often due to a particular PDF template that a company follows with the same kinds of information in the same location. For example, a 6 page invoice where you just want to show the first 2 pages that contains the key information you’re after. The […]
Keep reading Keep reading

How to Customize Right Click Annotation Menus with Foxit PDF SDK for Web

by Conor Smith | August 12, 2020
This guide will walk you through the following topics: Customizing a right-click menu for supported annotations Customizing a right-click menu for unsupported annotations Hiding a right click menu or menu items Showing a customized right-click menu Customize right-click menu for supported annotations Foxit’s JavaScript Web PDF Library supports most standard annotation types. Each type can have its […]
Keep reading Keep reading

How to Add Another Language to Foxit PDF SDK for Web

by Conor Smith | July 27, 2020
Foxit PDF SDK for Web enables you to update all of the strings used by the PDF viewer so you can change it to your language. You can easily create a new folder for your own language at the ‘locales’ folder and translate the string content on ‘ui.json’ and ‘viewer.json’ for all objects. By directing […]
Keep reading Keep reading

How to Use Foxit PDF SDK for Web Offline

by Conor Smith | July 27, 2020
Using PDF SDK for Web offline enables you to get the most out of our Web based JavaScript PDF viewer for your workflows. In order to use the SDK offline, please follow the following easy steps: Turn off your internet connection and visit https://webviewer-demo.foxit.com/examples/UIExtension/pwa/. You will get a ‘no internet connection’ message on your screen. Next, re-connect […]
Keep reading Keep reading
Used everywhere

Trusted by