Foxit pdf SDK for windows

Foxit PDF SDK for Windows features a powerful, easy-to-use Core API in C++, C#, and Java for rendering, viewing, annotation, signing, protecting and managing forms in PDFs. Alongside a full-feature Core API, our Windows PDF SDK comes with in-depth demos and sample code to help you build a PDF viewer or workflow solution that is both dynamic and robust.

Developing with Foxit PDF SDK on Windows

Foxit PDF SDK for Windows features three libraries: C++, C# (.NET) and Java, built to run in both desktop and server environments, both 32-bit and 64-bit.

Foxit Windows Support

FEATURES

PDF Viewing

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

Digital Signature

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.

New!

Introducing PDF SDK 6.1

Foxit PDF SDK 6.1 introduces full support for Xamarin, Cordova, and React Native on Android and iOS, and Kotlin on Android, as well as support for Associated Files, Embedded fonts, and improvements to our Redaction features. Try it today for free for 15 days!

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.

OCR

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.

REDACTION

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

CONNECTED PDF

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.

CONVERSION

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.

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.

OCR

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.

REDACTION

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.

CONNECTEDPDF

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.

CONVERSION

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.

AVAILABLE FOR BOTH WINDOWS SERVERS AND DESKTOPS

Foxit PDF SDK is the most feature-complete PDF SDK in the market.

IN DESKTOP

Allow end users to view, navigate, edit, annotate, sign, fill forms, secure, redact, manipulate, mark-up and print PDF documents quickly and easily from your application.

IN SERVER

Programmatically create, merge, split (or perform any of the actions on the left!) millions of PDF documents through our C++, C# (.NET) or Java libraries.

Function-specific products

PDF SDK for Windows is a powerful, full-platform SDK. If you are looking to only perform simple tasks in .NET or ActiveX, you may want to look into:

PDF .NET SDK

Perform basic actions in .NET

  • .NET Viewer
  • .NET Merger
  • .NET Generator
  • .NET Print Manager
  • .NET Rasterizer

PDF ActiveX SDK

Instant PDF Viewing

  • Fast time to market
  • Visual programming components
  • Small
  • Fast
  • High Quality

TRUSTED BY LEADERS ALL OVER THE WORLD

Foxit SDK Customers

System Requirements

Operating Systems
  • Windows XP, Vista, 7, 8 and 10 (32-bit and 64-bit)
  • Windows Server 2003, 2008, 2012 and 2016 (32-bit and 64-bit)
Foxit Windows Support

Foxit PDF SDK for Windows in action

        static void Main(string[] args)
        {
            string input_path = "../input_files/";
            string output_path = "../output_files/bookmark/";
            System.IO.Directory.CreateDirectory(output_path);

            string sn = "";
            string key = "";
            ErrorCode error_code = Library.Initialize(sn, key);
            if (error_code != ErrorCode.e_ErrSuccess)
            {
                Console.WriteLine("Library Initialize Error: {0}\n", error_code);
                return;
            }

            try
            {
                string input_file = input_path + "AboutFoxit.pdf";
                string output_file1 = output_path + "bookmark_add.pdf";
                string output_file2 = output_path + "bookmark_change.pdf";

                using (PDFDoc doc = new PDFDoc(input_file))
                {
                    error_code = doc.Load(null);
                    if (error_code != ErrorCode.e_ErrSuccess)
                    {
                        Console.WriteLine("The PDFDoc [{0}] Error: {1}\n", input_file, error_code);
                        Library.Release();
                        return;
                    }

                    // Show original bookmark information.
                    ShowBookmarksInfo(doc, output_path + "bookmark_info.txt");

                    //Get bookmark root node or Create new bookmark root node.
                    Bookmark root = doc.GetRootBookmark();
                    
                        if (root.IsEmpty())
                        {
                            root = doc.CreateRootBookmark();
                        }
                        using (root)
                        {
                            for (int i = 0; i < doc.GetPageCount(); i += 2)
                            {
                                using (Destination dest = Destination.CreateFitPage(doc, i))
                                {
                                    string ws_title = string.Format("A bookmark to a page (index: {0})", i);

                                    Bookmark child;
                                    using (child = root.Insert(ws_title, Bookmark.Position.e_PosLastChild))
                                    {
                                        child.SetDestination(dest);
                                        child.SetColor(i * 0xF68C21);
                                    }
                                }
                            }
                            doc.SaveAs(output_file1, (int)PDFDoc.SaveFlags.e_SaveFlagNoOriginal);

                            // Get first bookmark and change properties.
                            Bookmark first_bookmark;
                            using (first_bookmark = root.GetFirstChild())
                            {
                                first_bookmark.SetStyle((int)Bookmark.Style.e_StyleItalic);
                                first_bookmark.SetColor(0xFF0000);
                                first_bookmark.SetTitle("Change bookmark title, style, and color");

                                // Remove next sibling bookmark
                                using (Bookmark nextsibling_bookmark = first_bookmark.GetNextSibling())
                                {
                                    if (!nextsibling_bookmark.IsEmpty())
                                    {
                                        doc.RemoveBookmark(nextsibling_bookmark);
                                    }
                                }
                                string bookmark_info_file = output_path + "bookmark_info1.txt";
                                ShowBookmarksInfo(doc, bookmark_info_file);
                            }
                        }
                    doc.SaveAs(output_file2, (int)PDFDoc.SaveFlags.e_SaveFlagNoOriginal);
                    Console.WriteLine("Bookmark demo.");
                }
            }
            catch (foxit.PDFException e)
            {
                Console.WriteLine(e.Message);
            }

            Library.Release();
        }
    }
namespace pdf2imageCS
{
    class pdf2image
    {
        private const string input_path = "../input_files/";
        private const string output_path = "../output_files/pdf2image/";

        public static void Save2Image(System.Drawing.Bitmap bitmap, int nPageIndex, string sExt)
        {
            string save_name = output_path + string.Format("AboutFoxit_{0}{1}", nPageIndex, sExt);
            // Add the bitmap to image and save the image.
            foxit.common.Image image = new foxit.common.Image();
            image.AddFrame(bitmap);
            image.SaveAs(save_name);

            Console.WriteLine("Save page {0} into a picture of {1} format.", nPageIndex, sExt);
        }

        public static void Save2Image(foxit.common.Image image, string sExt)
        {
            string save_name = output_path + string.Format("AboutFoxit{0}", sExt);
            // Add the bitmap to image and save the image.
            image.SaveAs(save_name);

            Console.WriteLine("Save pdf file into a picture of {0} format.", sExt);
        }

        static void Main(string[] args)
        {
            System.IO.Directory.CreateDirectory(output_path);

            string sn = "";
            string key = "";
            ErrorCode error_code = Library.Initialize(sn, key);
            if (error_code != ErrorCode.e_ErrSuccess)
            {
                Console.WriteLine("Library Initialize Error: {0}\n", error_code);
                return;
            }

            string[] support_image_extends = { ".bmp", ".jpg", ".jpeg", ".png", ".jpx", ".jp2" };
            string[] support_multi_image = { ".tif", ".tiff" };
            try
            {
                string input_file = input_path + "AboutFoxit.pdf";
                using (PDFDoc doc = new PDFDoc(input_file))
                {
                    error_code = doc.Load(null);
                    if (error_code != ErrorCode.e_ErrSuccess)
                    {
                        Console.WriteLine("The PDFDoc [{0}] Error: {1}\n", input_file, error_code);
                        Library.Release();
                        return;
                    }

                    foxit.common.Image image = new foxit.common.Image();
                    // get page count
                    int nPageCount = doc.GetPageCount();
                    for(int i=0;i<nPageCount;i++)
                    {
                        using (PDFPage page = doc.GetPage(i))
                        {
                            // Parse page.
                            page.StartParse((int)foxit.pdf.PDFPage.ParseFlags.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.
                            System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(width, height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
                            Graphics draw = Graphics.FromImage(bitmap);
                            draw.Clear(Color.White);

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

                            draw.Dispose();
                        }
                    }
                    for (int j = 0; j < support_multi_image.Length; j++)
                    {
                        string extend = support_multi_image[j];

                        Save2Image(image, extend);
                    }
                }
            }
            catch (foxit.PDFException e)
            {
                Console.WriteLine(e.Message);
            }

            Library.Release();
        }
    }
}