Foxit pdf SDK for LINUX

Our PDF SDK for Linux is a powerful rendering, digital signature, form filling and text processing PDF solution for any Linux enterprise or cloud application. Provided in our software development kit are functional PDF demos for developers to realize the power behind our core API. Our feature rich PDF SDK is ideal for any Linux developer looking to create a fully customizable PDF Viewer or back-end process in their embedded Linux based operating systems and cloud applications.

Developing with PDF SDK for Linux

Embedding Foxit PDF SDK into your Linux based applications can be easy. Simply open your favorite Linux IDE, copy over the libraries that you need and start developing in C++ or Java. Our documentation and sample projects guide you through set up and development with our Linux PDF SDK. Our libraries are available for both 32- and 64- bit OS.

PDF SDK for Linux Support


PDF Viewing

Our Core API provides high-fidelity rendering of PDF documents with optimized performance for Linux-based devices.

PDF Signatures

Apply digital signatures based on hand-drawn signatures made on end user devices running embedded Linux-based operating systems.

PDF Forms

Give users the ability to fill out digital forms on the go on your Linux device or application. Or, automatically populate PDF forms with data from a database.

Text reflow

Reflow rearranges page content when the page size changes. It is useful for applications that have output devices of different sizes. It frees the applications from considering layout for different devices.

PDF Annotations

Our Linux SDK provides full support for annotating and marking up content with an extensive range of functions for creating, editing or importing/exporting annotations programmatically.

Full Text Search

Fast full-text search for any PDF document, language, or encoding type. The SQLite-based full-text search delivers near-instant results, even for repositories with thousands of documents.



XFA Forms are XML-based forms wrapped inside a PDF. Securely capture, present, move, process, output, update and print information associated with static and dynamic XFA forms. Simplify your data sharing, transportation and availablity with XFA.

Rights Management

Keep your PDF documents secure by connecting your application and files to Microsoft's Rights Management Services platform natively. Foxit PDF SDK also integrates with your IRM and DRM solution.


Convert scanned documents to searchable text PDFs with our highly accurate enterprise optical character recognition (OCR) software. Designed for scanning, and archiving, our robust functionality outputs 13 different file formats including PDF & PDF/A.


Programmatically search and sensor sensitive information in a document for legal or security purposes to keep your customer and employee information safe. Achieve full GDPR-compliance.


Leverage Foxit's cutting-edge technology that powers document intelligence, security and collaboration services, programmatically, for PDF files. Secure files, access analytics, and collaborate in real time, all within one SDK.


Leverage our conversion and compression technology to speed up file conversion and archiving. Convert TIFF, JPEG, Word, Email, HTML, ASCII text and more to file formats including PDF and PDF/A.


full Linux support

Foxit specializes in providing a powerful solution for both embedded Linux operating systems optimized for hardware products and scalable cloud applications thanks to its power, flexibility and efficiency.


PDF SDK for Linux keeps RAM use to a minimum even through the toughest tasks. Additionally, our out-of-memory (OOM) functionality ensures your application will always recover gracefully from out of memory exceptions.

Feature Rich

Our feature set is consistent across desktop, server and mobile platforms to make cross platform development linear and easy. We are always updating our feature set, so keep an eye on our product page for announcements.

Powered by Foxit's Core Technology

The core technology of Foxit PDF SDK has been around for years and is trusted by many of the world’s big businesses, Foxit’s powerful and robust engine makes document viewing fast and consistent in all environments.


  • Linux 32-bit and Linux 64-bit
  • Test environment: Centos 6.4 32-bit and Centos 6.5 64-bit
  • PDF SDK for Linux includes a 32-bit and 64-bit version library


    public static void main(String[] args) throws PDFException, IOException {
        int error_code = Library.initialize(sn, key);
        if (error_code != e_ErrSuccess) {
            System.out.println(String.format("Library Initialize Error: %d\n", error_code));

        String input_file = input_path + "AboutFoxit.pdf";
        String output_file1 = output_path + "bookmark_add.pdf";
        String output_file2 = output_path + "bookmark_change.pdf";
        String bookmark_info_file = output_path + "bookmark_info.txt";

        try {
            PDFDoc doc = new PDFDoc(input_file);
            error_code = doc.load(null);
            if (error_code != e_ErrSuccess) {
                System.out.println(String.format("The Doc [%s] Error: %d\n", input_file, error_code));

            // Show original bookmark information.
            showBookmarksInfo(doc, bookmark_info_file);

            //Get bookmark root node or Create new bookmark root node.
            Bookmark root = doc.getRootBookmark();
            if (root.isEmpty()) {
                root = doc.createRootBookmark();
            for (int i = 0; i < doc.getPageCount(); i += 2) {
                Destination dest = Destination.createFitPage(doc, i);

                String ws_title = String.format("A bookmark to a page (index: %d)", i);
                Bookmark child = root.insert(ws_title,
                child.setColor(i * 0xF68C21);
            doc.saveAs(output_file1, e_SaveFlagNoOriginal);

            // Get first bookmark and change properties.
            Bookmark first_bookmark = root.getFirstChild();
            first_bookmark.setTitle("Change bookmark title, style, and color");

            // Remove next sibling bookmark
            if (!first_bookmark.getNextSibling().isEmpty()) {

            bookmark_info_file = output_path + "bookmark_info1.txt";
            showBookmarksInfo(doc, bookmark_info_file);

            doc.saveAs(output_file2, e_SaveFlagNoOriginal);
            System.out.println("Bookmark demo.");

        } catch (Exception e) {

public class pdf2image {

    private static String key = "";
    private static String sn = "";
    private static String output_path = "../output_files/pdf2image/";
    private static String input_path = "../input_files/";
    private static String input_file = input_path + "AboutFoxit.pdf";
    private static String[] support_image_extends = {".bmp", ".jpg", ".jpeg", ".png", ".jpx", ".jp2"};
	private static String[] support_multi_image = {".tif", ".tiff"};

    public static void main(String[] args) throws PDFException {


        int error_code = Library.initialize(sn, key);
        if (error_code != e_ErrSuccess) {
            System.out.println("Library Initialize Error: " + error_code);
        PDFDoc doc = new PDFDoc(input_file);
        error_code = doc.load(null);
        if (error_code != e_ErrSuccess) {
            System.out.println("The Doc " + input_file + " Error: " + error_code);

        Image image = new Image();
        int nPageCount = doc.getPageCount();
        for (int i = 0; i < nPageCount; i++) {
            PDFPage page = doc.getPage(i);
            // Parse page.
            page.startParse(e_ParsePageNormal, null, false);

            int width = (int) page.getWidth();
            int height = (int) page.getHeight();
            Matrix2D matrix = page.getDisplayMatrix(0, 0, width, height, page.getRotation());

            // Prepare a bitmap for rendering.

            Bitmap bitmap = new Bitmap(width, height, e_DIBArgb, null, 0);
            bitmap.fillRect(0xFFFFFFFF, null);

            // Render page
            Renderer render = new Renderer(bitmap, false);
            render.startRender(page, matrix, null);
            for (int j = 0; j < support_image_extends.length; j++) {
                String extend = support_image_extends[j];
                Save2Image(bitmap, i, extend);
        for (int j = 0; j < support_multi_image.length; j++) {
            String extend = support_multi_image[j];
            Save2Image(image, extend);


    private static void createResultFolder(String output_path) {
        File myPath = new File(output_path);
        if (!myPath.exists()) {

    private static void Save2Image(Bitmap bitmap, int nPageIndex, String sExt) throws PDFException {
        Image image = new Image();
        String s = "AboutFoxit_" + nPageIndex;
        s = output_path + s + sExt;

		System.out.println("Save page " + nPageIndex + " into a picture of " + sExt + " format.");

	private static void Save2Image(Image image, String sExt) throws PDFException {
        String s = "AboutFoxit";
        s = output_path + s + sExt;

		System.out.println("Save pdf file into a picture of " + sExt + " format.");