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

FEATURES

PDF Viewing

Our core API provides for high-fidelity rendering of PDF documents with optimized performance for desktop and mobile platforms.

Digital SignatureS

Use ink signatures to let customers sign documents in their digital devices. No need to print a file to sign again!

PDF Forms

Give users the ability to fill out digital forms on the go with their device of choice. Apps have never been more productive!

PDF Password Android
Strikeout annotation
Full Text Search

Rights Management

Our PDF SDK can generate secure PDFs with native encryption/decryption or integrate with customized DRM or IRM security systems. Our technology integrates with Microsoft RMS.

PDF Annotations

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

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 on any digital device.

INTRODUCING FOXIT PDF SDK 7.0 & PDF SDK FOR WEB 7.1

The latest Foxit PDF SDK release is our biggest one yet. PDF SDK 7.0 comes with 22 new JavaScript methods & properties which give you more control over annotations, a PDF conversion add-on that allows you to convert HTML to PDF with our powerful PDF SDK engine, signature support for PAdES, the official standard for the use of CAdES in PDFs, as well as .NET Core support.

PDF SDK for Web 7.1 now has a fully responsive UI for mobile devices, including tablets. You can integrate our powerful web viewer in your application and offer a seamless mobile viewing experience. We also have exciting new features including import/export of annotation data to XFDF, support for AngularJS, and much more!

ADVANCED TECHNOLOGY

XFA FORMS

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

RIGHTS MANAGEMENT

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

XFA FORMS

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 availability 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.

PDF/A

Leverage our conversion and verification technology to turn regular PDFs into PDF/A compliant documents. If you are already working with PDF/A in your processes, proactively verify third-party PDFs you receive are PDF/A compliant.

Benefits

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.

LOW MEMORY USE

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.

SYSTEM REQUIREMENTS

 

  • 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

LOAD A PDF AND ADD AN IMAGE IN LINUX

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

        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));
                return;
            }

            // 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,
                        e_PosLastChild);
                child.setDestination(dest);
                child.setColor(i * 0xF68C21);
            }
            doc.saveAs(output_file1, e_SaveFlagNoOriginal);

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

            // Remove next sibling bookmark
            if (!first_bookmark.getNextSibling().isEmpty()) {
                doc.removeBookmark(first_bookmark.getNextSibling());
            }

            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) {
            e.printStackTrace();

        }
        Library.release();
        return;
    } 
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 {

        createResultFolder(output_path);

        int error_code = Library.initialize(sn, key);
        if (error_code != e_ErrSuccess) {
            System.out.println("Library Initialize Error: " + error_code);
            return;
        }
        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);
            return;
        }

        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);
            image.addFrame(bitmap);
            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);
        }

        Library.release();
    }

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

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

		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;
        image.saveAs(s);

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