Foxit PDF SDK

What demos do you have? Where can I find them?

In order to help users to develop applications based on Foxit PDF SDK, Foxit PDF SDK provides demos that can be found in the "samples" folder of the download package to show how to implement some important PDF functionalities by calling the Foxit PDF SDK APIs.

Function Demos

The function demos support the C/C++ and Java programming languages. For C/C++, there are more than 20 demos in the "samples/simple_sample" folder which cover a wide range of PDF applications. The demos are listed as follows. For more detailed information, please refer to the Demo Tutorial in the "docs" folder of the download package.

Demo Support Description
multiple_threads Windows, Linux, and Mac This demo illustrates how to start multiple-thread environment and process different PDF documents in different threads. The execution part of the demo hasn't added many specific functionality calling but mainly illustrates the initialization process of Foxit PDF SDK library, creation of multiple-thread environment and basic access of PDF documents.
bitmap_transform Windows, Linux, Mac and iOS This demo illustrates how to load different types of image files as bitmap files, convert bitmap files by flip, stretch, transform, etc. and save the conversion results as different image files respectively. The demo focuses on illustrating how to convert images by Foxit PDF SDK libraries.
Currently, the image formats supported are: bmp, tif, gif, png and jpeg.
barcode Windows, Linux, Mac and iOS This demo illustrates how to generate different encoding formats of barcodes and save them as bmp image files after running the demo.
Currently, there are 8 formats of barcodes supported:
1D barcode: Code39, Code128, EAN8, UPCA, EAN13, ITF
2D barcode: PDF417, QR
pdfdocinfo Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK libraries to set and get the Viewer Preference property and metadata of PDF files.
pdfbookmark Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK libraries to enumerate and modify bookmarks in PDF files and how to save PDFs.
pdfannot Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK libraries to open PDF files and add different types of annotations to PDF pages. Developers can refer to the code to create various annotations in PDF files.
pdfforminfo Windows, Linux, Mac and iOS This demo illustrates how to get form data from PDF files and import the FDF files---the external files that save PDF form data, to PDF files.
pdfpagelabel Windows, Linux, Mac and iOS This demo illustrates how to load PDF files and PDF pages and how to get page label information of PDFs.
pdfpage_organization Windows, Linux, Mac and iOS This demo illustrates through Foxit PDF SDK libraries how to split and merge pages of a PDF file and then save as a PDF file. How to delete page, how to set page index.
pdfpageobjects Windows, Linux, Mac and iOS This demo illustrates how to create a PDF document and a page, insert the four page objects(image, path, text and FormXObject.) into newly-created PDF pages and save the document as a PDF file.
pdfobjects Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to open PDF files and manipulate the dictionary contents of the PDF documents directly.
pdfreflow Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to reflow the page contents of PDF documents for easy reading. The function is mainly used when the screen of an embedded device is small.
After reflowing, some data may be lost, such as tables, images, etc.
pdfsearch Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to find contents in PDF documents. If the contents are found, you will be returned to the page where the character string is and the rectangle area of the page.
pdf2text Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to extract text from PDF files and save the texts in a text file.
pdf2img Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to render every page of contents in a PDF document to an image file or render a multi-page PDF file into a multi-page tif file. Currently, some image formats are supported and they are: bmp, tif, gif, png and jpeg.
img2pdf Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to insert image files into a newly-created PDF file and how to convert a multi-page tif file to a PDF file.
pdfencrypt Windows, Linux, Mac and iOS This demo illustrates how to set user passwords, owner passwords and user permissions of PDF documents and how to remove existing passwords of PDF documents.
pdfprint Windows This demo illustrates how to use Foxit PDF SDK to output contents of PDFs from the default typewriter in Windows.
pdfwatermark Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to add text watermarks, image watermarks and PDF-page watermarks to PDF files.
pdfasync Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to open local PDF files asynchronously and read PDF file contents.
fdf Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to export annotations in PDF files to external FDF files and how to import an external FDF file into a PDF file.
psi Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to add pressure sensitive ink, just as importing a series of coordinate points to a PDF file.
pdfflatten Windows, Linux, Mac and iOS This demo illustrates how to flatten a page with form/annotation for display or print purpose.
pdfwrapper Windows, Linux, Mac and iOS This demo illustrates how to create a wrapper document and how to read/render it.
pdfattachment Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to save PDF's attachments as new files and add a file into PDF file as an attachment.
pdfcontentmark Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to mark PDF content.
pdflayer Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to selectively render and export PDF layers information.
layeredit Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to add and edit layers in a PDF document.
matrix Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK Matrix to transform page objects, like image and text objects, in a PDF document.
annots_summary Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to summarize the annotations in a PDF document.
pdfdigitalsignature Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to add and verify signatures (including time stamp) in PDF files.
addformfields Windows, Linux, Mac and iOS This demo illustrates how to use Foxit PDF SDK to add form fields to a PDF document.

For Java, there are 2 demos in the "samples" folder of the download package for Windows and Linux. The demos are listed as follows.

img2pdf Windows, Linux This demo illustrates how to use Foxit PDF SDK to insert image files into a newly-created PDF file and how to convert a multi-page tif file to a PDF file.
fdf Windows, Linux This demo illustrates how to use Foxit PDF SDK to export annotations in PDF files to external FDF files and how to import an external FDF file into a PDF file.
pdf2img Windows, Linux

This demo illustrates how to use Foxit PDF SDK to convert PDF files to four image formats (BMP, PNG, GIF, and JPG).

signature Windows, Linux This demo illustrates how to use Foxit PDF SDK to add a signature to PDF files with the default signing feature.

Viewer Demos

The viewer demos can be found in the "samples/view_demo", "samples/win10universal", "samples/win10universal_CSharp","samples/CSharp", "samples/C++", "samples/view_sample", “samples/ViewerDemo”, “samples/android_studio_demo” and “samples/eclipse_demo” folders of the download package, which are used for showing how to implement a simple PDF viewer. It supports the platforms of Windows, Windows 10, Windows Phone 8.1, iOS, Android C and Java API. For more detailed information, please refer to the Developer Guide in the "docs" of the download package.

OOM Demos

The OOM demos can be found in the "samples/view_demo" and "samples/view_sample" folders of the download package, which is used for showing how to hand OOM. It supports the platforms of iOS and Android Java API. For more detailed information, please refer to the Developer Guide in "docs" of the download package.

Form Demo

The form demo can be found in the "samples/view_demo" of the download package, which is used to show how to fill forms. It supports the Android platform. For more detailed information, please refer to the Developer Guide in "docs" of the download package.

Annotation Demos

The annotation demos can be found in the "samples/CSharp" and "samples/C++" folders of the download package, which are used for showing how to add annotations to a PDF document. It supports the platform of Windows Phone 8.1. For more detailed information, please refer to the Developer Guide in the "docs" of the download package.

Xamarin Demos

The Xamarin demos can be found in the “samples/view_sample/xamarin_demo" and “samples/xamarin_demo" folders of the download package, which are used for showing how to run a simple PDF viewer in Xamarin Studio. It supports the platform of iOS and Android Java API. For more detailed information, please refer to the Developer Guide in the "docs" of the download package.

Win10 UWP Demo

The Win10 UWP demo can be found in the “samples" folder of the download package, which is used for showing how to implement a simple PDF viewer on Universal Windows Platform for Windows 10. For more detailed information, please refer to the Developer Guide in the "docs" of the download package.

Windows .NET Component Demo

The Windows .NET Component demo can be found in the “samples" folder of the download package, which is used for showing how to implement a simple PDF viewer based on Windows .NET. For more detailed information, please refer to the Developer Guide in the "docs" of the download package.

Multi-Thread Demos

The multi-thread demos support the platforms of Windows and Linux with C/C++ and Java. For C/C++, please refer to the "How to improve performance of applications based on Foxit PDF SDK in servers" PDF file in the "docs" folder of the download package to get more detailed information. It includes the following demos:

Demo Support Description
mt_pdf2txt Windows This demo introduces how to implement multi-thread applications based on Foxit PDF SDK so that applications can achieve higher performance. This demo performs the conversion from PDF to text with multi-thread support.
linux_mt_pdf2txt Linux

For Java, It includes the following demo:

mt_watermark Windows and Linux The mt_watermark demo illustrates how to implement multi-thread applications based on Foxit PDF SDK to achieve higher performance. This demo performs to add watermark in multiple documents with multi-thread support.