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
Zoom PDF Editor SDK

PDF VIewing

Our Fx Core allows for crisp, fast rendering in all screens and devices of 100% of PDF files, regardless of source.

Mark-Up PDF viewer SDK

PDF ANNOTATIONS

Allow your users to annotate, comment, mark-up, freehand text (PSI), stamp and watermark files, or do so programmatically.

Form Filling PDF Library

PDF FORMS

PDF SDK for Windows support AcroForms and static/dynamic XFA forms for faster and more efficient filling and processing. 

Full-Text Search PDF Library

PDF SEARCH

Full-text search all instances of a word or sentence in a file, either in the UI or programmatically, to redact if necessary.

text reflow

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

PDF SIGNING

Apply, read, edit and remove digital signature certificates from PDF documents programmatically. Allow your end users to sign documents, either with a certificate or with a pen (PSI) from within your application.

Page organization

Create, merge, split, delete, edit and rearrange/shuffle PDF documents and pages programmatically. Add pages to PDFs from source files and images. Edit and extract text, based on rules or from the application.

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.

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 availablity with XFA.

OCR

Convert scanned documents to searchable text PDFs with our highly accurate enterprise optical character recognition (OCR) software. Designed for scanning, archiving and digitization, 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();
        }
    }
}