Foxit is the Industry Leader in PDF SDK Technology

We work with you to add complete PDF library functionality to your project and develop across all platforms and environments on one core API.

The best tools for developers

All Platforms Supported

Build on a modern tech stack that integrates tightly with the platform you’re working on. We continuously improve our products and they gain new features every release.

We grow with you as your requirements change and your project evolves.

using namespace std; using namespace foxit; using namespace foxit::common; using foxit::common::Library; using namespace pdf; using namespace annots; using foxit::pdf::annots::Line; // Create a blank document PDFDoc doc = PDFDoc(); // Add a blank A4 page to the document PDFPage page = doc.InsertPage(0, 595, 842); // Create a note annotation annots::Note note(page.AddAnnot(Annot::e_Note, RectF(10, 350, 50, 400))); // Set note annotation properties note.SetIconName("Comment"); note.SetSubject(L"Note"); note.SetTitle(L"Foxit SDK"); note.SetContent(L"Note annotation."); note.SetCreationDateTime(GetLocalDateTime()); note.SetModifiedDateTime(GetLocalDateTime()); note.SetUniqueID(WString::FromLocal(RandomUID())); // Add state annotation to note annotation Note state = note.AddStateAnnot(Markup::e_StateModelReview, Markup::e_StateAccepted); state.SetContent(L"Accepted set by Foxit SDK"); state.SetTitle(L"Foxit SDK"); state.SetModifiedDateTime(GetLocalDateTime()); state.SetUniqueID(WString::FromLocal(RandomUID())); state.ResetAppearanceStream(); // Appearance should be reset. note.ResetAppearanceStream(); cout << "Add a note annotation." << endl; // Save PDF file doc.SaveAs("new_document.pdf", PDFDoc::e_SaveFlagNoOriginal);
C++
server.js 100% | 6/6 ln : 4
using foxit; using foxit.common; using foxit.common.fxcrt; using foxit.pdf; using foxit.pdf.annots; using (PDFDoc doc = new PDFDoc()) { // Add a blank A4 page to the document PDFPage page = doc.InsertPage(0, 595, 842); // Get first page with index 0 using (PDFPage page = doc.GetPage(0)) { // Add note annotation Note note = null; Annot annot = null; using (annot = page.AddAnnot(Annot.Type.e_Note, new RectF(10, 350, 50, 400))) using (note = new Note(annot)) { note.SetIconName("Comment"); note.SetSubject("Note"); note.SetTitle("Foxit SDK"); note.SetContent("Note annotation."); note.SetCreationDateTime(GetLocalDateTime()); note.SetModifiedDateTime(GetLocalDateTime()); note.SetUniqueID(RandomUID()); } // Add state annotation to note annotation using (Note state = note.AddStateAnnot(Markup.StateModel.e_StateModelReview, Markup.State.e_StateAccepted)) { state.SetContent("Accepted set by Foxit SDK"); state.SetTitle("Foxit SDK"); state.SetModifiedDateTime(GetLocalDateTime()); state.SetUniqueID(RandomUID()); state.ResetAppearanceStream(); // Appearance should be reset. note.ResetAppearanceStream(); Console.WriteLine("Add a note annotation."); } // Save PDF file String newPdf = output_path + "annotation.pdf"; doc.SaveAs(newPdf, (int)PDFDoc.SaveFlags.e_SaveFlagNoOriginal); } }
C#
server.js 100% | 6/6 ln : 4
// Create a new document FSPDFDoc* doc = [[FSPDFDoc alloc] init]; // Set a blank page width and height and add to document floatw =612.0;floath =792.0; FSPDFPage* page = [doc insertPage:index width:w height:h]; // Add note annotation FSRectF* annot_rect = [[FSRectF alloc] initWithLeft1:10 bottom1:350 right1:50 top1:400]; FSNote* note = [[FSNote alloc] initWithAnnot:[page addAnnot:FSAnnotNote rect:annot_rect]]; // Set some properties for the annotation [note setIconName:@"Comment"]; [note setSubject:@"Note"]; [note setTitle:@"Foxit SDK"]; [note setContent:@"Note annotation."]; // Reset Appearance [note resetAppearanceStream]; NSLog(@"Add a note annotation."); // Save PDF file NSString* save_pdf_path = [output_directory stringByAppendingPathComponent:@"annotation.pdf"]; [doc saveAs:save_pdf_path save_flags:FSPDFDocSaveFlagNoOriginal];
Objective-C
server.js 100% | 6/6 ln : 4
#import "AppDelegate.h" #import <UIKit/UIKit.h> @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSString *sn = @"your-licence-key-signature"; NSString *key = @"your-licence-here"; FSErrorCode eRet = [FSLibrary initialize:sn key:key]; if (FSErrSuccess != eRet) { NSLog(@"License Key Invalid"); } return YES; }
Objective-C
server.js 100% | 6/6 ln : 4
import com.foxit.sdk.common.Library; import com.foxit.sdk.common.fxcrt.RectF; import com.foxit.sdk.pdf.PDFDoc; import com.foxit.sdk.pdf.PDFPage; import com.foxit.sdk.pdf.annots.Note; // Load a document PDFDoc doc = new PDFDoc(); // Get first page with index 0 PDFPage page = doc.insertPage(0, 595, 842); // Add note annotation Note note = new Note(page.addAnnot(Annot.e_Note, new RectF(10, 350, 50, 400))); //This flag is used for printing annotations. note.setFlags(4); note.setIconName("Comment"); note.setSubject("Note"); note.setTitle("Foxit SDK"); note.setContent("Note annotation."); note.setCreationDateTime(GetLocalDateTime()); note.setModifiedDateTime(GetLocalDateTime()); note.setUniqueID(RandomUID()); // Add state annotation to note annotation Note state = new Note(note.addStateAnnot("Foxit SDK", Markup.e_StateModelReview, Markup.e_StateAccepted)); state.setContent("Accepted set by Foxit SDK"); state.setUniqueID(RandomUID()); // Appearance should be reset. note.resetAppearanceStream(); System.out.println("Add a note annotation."); // Save PDF file doc.saveAs(output_file, PDFDoc.e_SaveFlagNoOriginal);
Java
server.js 100% | 6/6 ln : 4
import com.foxit.sdk.PDFException; import com.foxit.sdk.common.Library; import java.io.File; import static com.foxit.sdk.common.Constants.e_ErrSuccess; import static com.foxit.sdk.pdf.PDFDoc.e_SaveFlagNoOriginal; public static void main(String[] args) throws PDFException { // Initialize library int error_code = Library.initialize(sn, key); if (error_code != e_ErrSuccess) { System.out.println("Library Initialize Error: " + error_code); return; } Library.release(); }
Java
server.js 100% | 6/6 ln : 4
import com.foxit.sdk.PDFViewCtrl; import com.foxit.sdk.common.Constants; import com.foxit.sdk.common.fxcrt.RectF; import com.foxit.sdk.common.fxcrt.RectFArray; import com.foxit.sdk.pdf.PDFDoc; import com.foxit.sdk.pdf.PDFPage; import com.foxit.sdk.pdf.TextSearch; import com.foxit.sdk.pdf.annots.Annot; import com.foxit.sdk.pdf.annots.Note; import com.foxit.sdk.pdf.annots.QuadPoints; import com.foxit.sdk.pdf.annots.QuadPointsArray; import com.foxit.sdk.pdf.annots.TextMarkup; import com.foxit.sdk.common.fxcrt.PointF; // Define path String pdfpath = "xxx/Sample.pdf"; // Create PDF from scratch PDFDoc doc = new PDFDoc(pdfpath); doc.load(null); // Get first page of document PDFPage pdfPage = doc.getPage(1); // Create rectangle RectF rect = new RectF(100, 100, 120, 120); Note note = new Note(pdfPage.addAnnot(Annot.e_Note, rect)); note.setIconName("Comment"); // Set border color to blue note.setBorderColor(0xff0000ff); // Add some content note.setContent("Foxit PDF SDK"); // Reset appearance note.resetAppearanceStream();
Java
server.js 100% | 6/6 ln : 4
package com.foxit; import android.content.Context; import android.os.Environment; import com.foxit.home.R; import com.foxit.pdfreader.MultiTabView; import com.foxit.pdfreader.fragment.AppTabsManager; import com.foxit.sdk.common.Constants; import com.foxit.sdk.common.Library; import com.foxit.uiextensions.controls.toolbar.IBaseItem; import com.foxit.uiextensions.home.local.LocalModule; import com.foxit.uiextensions.utils.UIToast; import java.io.File; import java.util.HashMap; public class App { private static String sn = "your license key signature"; private static String key = "your license key"; private Context mContext; private int errCode = Constants.e_ErrSuccess; private static App INSTANCE = new App(); public static App instance() { return INSTANCE; } private App(){ errCode = Library.initialize(sn, key); } public boolean checkLicense(){ switch (errCode) { case Constants.e_ErrSuccess: break ; case Constants.e_ErrInvalidLicense: UIToast.getInstance(mContext).show(mContext.getString(R.string.fx_the_license_is_invalid)); return false; default: UIToast.getInstance(mContext).show(mContext.getString(R.string.fx_failed_to_initialize_the_library)); return false; } return true; } }
Java
server.js 100% | 6/6 ln : 4
// Create a new document FSPDFDoc* doc = [[FSPDFDoc alloc] init]; // Set a blank page width and height and add to document floatw =612.0;floath =792.0; FSPDFPage* page = [doc insertPage:index width:w height:h]; // Add note annotation FSRectF* annot_rect = [[FSRectF alloc] initWithLeft1:10 bottom1:350 right1:50 top1:400]; FSNote* note = [[FSNote alloc] initWithAnnot:[page addAnnot:FSAnnotNote rect:annot_rect]]; // Set some properties for the annotation [note setIconName:@"Comment"]; [note setSubject:@"Note"]; [note setTitle:@"Foxit SDK"]; [note setContent:@"Note annotation."]; // Reset Appearance [note resetAppearanceStream]; NSLog(@"Add a note annotation."); // Save PDF file NSString* save_pdf_path = [output_directory stringByAppendingPathComponent:@"annotation.pdf"]; [doc saveAs:save_pdf_path save_flags:FSPDFDocSaveFlagNoOriginal];
Objective-C
server.js 100% | 6/6 ln : 4
#import "AppDelegate.h" #import <UIKit/UIKit.h> @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { NSString *sn = @"your-licence-key-signature"; NSString *key = @"your-licence-here"; FSErrorCode eRet = [FSLibrary initialize:sn key:key]; if (FSErrSuccess != eRet) { NSLog(@"License Key Invalid"); } return YES; }
Objective-C
server.js 100% | 6/6 ln : 4
// Set new PDF metadata
JavaScript
server.js 100% | 6/6 ln : 4
Read the docs

NEW: Announcing Foxit PDF Conversion SDK

A brand new flexible high-performance library to convert PDF files to MS Office Suite files (.docx, .xlsx, .pptx) for Windows and Web. Click below to find out more.

Used everywhere

Trusted by some of the world’s largest companies.

Take a look at who uses our technology.

Business success

Industries

Engineering

PDF technology helps engineering companies develop applications to help them become more productive and fully compliant.

Insurance

Recent trends in the insurance industry has shown great innovation in PDF technology to provide better document management systems to clients.

Banking

Businesses in banking have adopted many new technologies to improve their offering. We look at how PDF library technology can do this for them.

Document Management

By injecting PDF technology into your software, document management companies can enhance their security and retrieval of data for their customers.

Compliance

Compliance can be a whirlwind of emotions for companies, but PDF technology can make life easier from many different points of view.

Healthcare

For patients and staff, PDF technology lowers costs, reduces errors, improves care, centralizes systems and makes documents more accessible and traceable.

The Important Choice

Developer Benefits

Simple Core API

Our core API is designed from the ground up to deliver a seamless development experience across all platforms, without requiring deep PDF knowledge.

Dependable

Foxit is known for our management of edge cases, and for working with 100% of PDF files across all standards. With only one SDK to work with, you dramatically reduce your exposure to third parties.

Thoroughly Documented

We provide sample projects, demos, API docs and more for every single feature in the PDF SDK to get you up to speed quickly.

Support By Real Developers

Foxit’s team of sales engineers are PDF experts and coders by trade. They will assist you throughout your proof of concept process.

Why choose Foxit

for your business?

Welcome to Foxit PDF SDK for Web and Desktop 9.0! This release comes with a brand new collaboration add-on for Web, multiline tiled watermarks, image difference comparisons, custom dynamic stamps, a multi-platform App UI (MAUI) project, mixed raster content (MRC) image compression, PDF Conversion SDK is now available as an add-on, and much more! Check out the changelog for full information on the release.

Better rendering quality

Supporting Fortune 500 customers that demand quality, we have the engineers, resources and the need to provide best-in-class rendering quality.

Faster rendering speed

Compared to our competitors, Foxit’s technology is faster, more accurate, and it works.

Worldwide support

With a truly worldwide presence, Foxit can provide you with the local support that you need through email, online messaging and phone calls in real-time.

Out of Memory Management

The Out of Memory Management (OOM) feature will ensure that the SDK automatically recovers from any anomalous events with minimal effect to the users experience.

Superior font handling

Foxit’s superior font matching algorithm can accurately determine which substitute most closely resembles the original non-embedded font and uses that to display the text.

Optimized for mobile

Foxit Software is probably best known for its small, fast and lightweight Foxit Reader app, which matches Adobe Reader’s rendering quality, but beats it in speed.

Customer Success

Case Studies