Foxit PDF SDK v12.0
Release date: September 30, 2026
Incompatible Changes
When upgrading from v11.1, the following changes may require code updates. Projects that are not updated may fail to compile or behave differently.
SearchCallback::NeedToCancel — New Pure Virtual Method
A new pure virtual method was added to the full-text search callback. Missing implementations fail to compile:
cpp
// Earlier versions: method did not exist
// 12.0 and later
virtual bool NeedToCancel() = 0;Required action: Implement the method on every SearchCallback subclass. If cancellation is not needed, return false. See Full-text search · Cooperative cancel.
WatermarkSettings Constructor and Set — Parameter Expansion
Two parameters were appended to the constructor and Set:
| Item | Earlier versions | 12.0 and later |
|---|---|---|
| New parameters | — | bool is_offset_centered, float relative_scale_to_page |
cpp
// Earlier versions
WatermarkSettings(position, offset_x, offset_y, flags, scale_x, scale_y, rotation, opacity);
settings.Set(position, offset_x, offset_y, flags, scale_x, scale_y, rotation, opacity);
// 12.0 and later
WatermarkSettings(position, offset_x, offset_y, flags, scale_x, scale_y, rotation, opacity,
is_offset_centered, relative_scale_to_page);
settings.Set(position, offset_x, offset_y, flags, scale_x, scale_y, rotation, opacity,
is_offset_centered, relative_scale_to_page);Required action: Supply the new parameters per the updated signatures. When relative scaling is unused, pass relative_scale_to_page = 0 (or your product convention); when centered offset is unused, pass is_offset_centered = false. See Watermark · Relative scale.
FillerAssistCallback::Refresh — Signature Change
The form-filler assist refresh callback signature changed:
cpp
// Earlier versions
virtual void Refresh(const PDFPage& page, const RectF* rect) = 0;
// 12.0 and later
virtual void Refresh(const PDFPage& page, const RectF& rect, bool has_reparse_page) = 0;Required action: Update every FillerAssistCallback (or equivalent) implementation: take rect by reference and handle has_reparse_page as needed. See AcroForm · Refresh.
Preflight::Analyze / AnalyzeAndFixup — Return Type Change
In the Compliance module, these APIs changed from returning nothing to returning ResultInformation. Parameters are unchanged; only the return type changed:
| API | Earlier versions | 12.0 and later |
|---|---|---|
Analyze | void | ResultInformation |
AnalyzeAndFixup | void | ResultInformation |
Required action: Update call sites to receive and handle the new return type. See Compliance · ResultInformation.
Callbacks required only when using the corresponding new capabilities (no change if unused):
PreflightGroupLocalCallback: localizes group item names and comments viaPreflight::SetPreflightGroupLocalCallback. ImplementRelease,GetGroupItemLocalName, andGetGroupItemLocalComment.
TaggedPDF / Accessibility APIs — Header Move and StartTagDocument
PDF Accessibility APIs moved into the accessibility add-on, with AutoTagging entry-point changes:
| Item | Earlier versions | 12.0 and later |
|---|---|---|
| Header path | pdf/pdfaccessibility/… | addon/accessibility/… (packages may also expose fs_taggedpdf.h—follow the published include tree) |
| Constructor | TaggedPDF(const PDFDoc& doc) | TaggedPDF(const PDFDoc& doc, bool is_fix = false) |
| Tagging entry | StartTagDocument(pause = NULL); plus SetCallback | StartTagDocument(pause, report_callback = NULL, callback = NULL); SetCallback deprecated |
pause default | Defaulted to NULL | No default; must be passed explicitly (may be NULL) |
cpp
// Earlier versions
TaggedPDF tagged(doc);
tagged.SetCallback(cb);
tagged.StartTagDocument();
// 12.0 and later
TaggedPDF tagged(doc, false);
tagged.StartTagDocument(NULL, report_stream, provider_callback); // pause must be explicitRequired action: Update #includes; remove SetCallback and pass the report stream plus optional AutoTagProviderCallback to StartTagDocument; always pass pause explicitly. See Accessibility · Auto tag.
DWG2PDFSettingData::export_hatches_type — Default Value Change
When left unset, the default hatch export type changed (silent behavior change):
| Property | Earlier-version default | 12.0 and later default |
|---|---|---|
export_hatches_type | e_DWG2PDFExportHatchesTypeBitmap | e_DWG2PDFExportHatchesTypePolygons |
other_export_hatches_type | — (not present) | e_DWG2PDFExportHatchesTypeBitmap |
gradient_export_hatches_type | — (not present) | e_DWG2PDFExportHatchesTypeBitmap |
Required action: To keep the earlier behavior, set export_hatches_type = e_DWG2PDFExportHatchesTypeBitmap explicitly; configure the new other/gradient hatch properties as needed. See DWG to PDF · Layout.
JavascriptEventType — Some Enum Numeric Values Shifted
In earlier versions, an unused integer gap (20) existed between FieldKeyStroke (value 19) and FieldValidate. In 12.0 that gap was assigned to FieldValidate, and subsequent enum values shifted forward by 1:
| Enum symbol (examples) | Earlier-version integer | 12.0 and later integer |
|---|---|---|
FieldKeyStroke | 19 | 19 (unchanged) |
FieldValidate | 21 | 20 |
FieldCalculate | 22 | 21 |
FieldFormat | 23 | 22 |
…through MediaStop | 46 | 45 |
Required action: Always use enum symbols (for example e_JavascriptEventTypeFieldValidate); do not hard-code integer enum values. If code uses if (type == 21) expecting FieldValidate, integer 21 maps to FieldCalculate in 12.0 and later. See JavaScript · Event types.
New Features and Enhancements
Platform
Node.js (Node-API): Migrated the Node.js native binding from the legacy Node/V8 Binding to Node-API, with prebuilt packages for napi3 / napi6 / napi8, expanding compatibility (approximately Node.js 8.15–26; some historical minor versions excluded). Installation automatically matches the current runtime.
Simple Demo command-line samples: Simple Demo supports command-line arguments. Samples are published at https://github.com/foxitsoftware/foxit-pdf-sdk-cli-samples.
Conversion
- Markdown and PDF conversion: Added Markdown to PDF (
Md2PDF::ConvertFromMarkdown) and PDF to Markdown (PDF2Md::ConvertToMarkdown). Load the Conversion library and ensure the corresponding module license before use. - Enhanced DWG/DXF to PDF: Configure layout scope, title-block XML, auto-tiling, line-weight styles, output DPI, and more via
DWG2PDFSettingData. Seeexport_hatches_typedefault change above. - Unified cross-platform Java Office-to-PDF entry points:
fromWord/fromExcel/fromPowerPointshare the same method parameters; the SDK Java binding dispatches by platform internally. Existing platform-specific APIs remain available.
OCR
- Improved OCR recognition quality (large-image handling, certain Chinese garbled-text scenarios, and related cases). Upgrade to the ABBYY OCR resource pack that ships with this release.
Signature and Security
- ISO 32004 document integrity protection: Standalone mode (
PDFDoc::StartIntegrityProtection) and signature-attached mode (StartIntegrityProtectionWithSignature), with configurable digest algorithm, password, permission bits, and whether to encrypt metadata.
Text and Content
- Glyph ID lookup by Unicode:
Font::GetGlyphID. - Full-text search ignore whitespace in the pattern:
FullTextSearch::SetIgnoreSpace; off by default; no index rebuild required. - Full-text search supports cooperative cancellation (see
NeedToCancelabove) - Watermarks support relative scaling to the target page and offset calculation from the watermark center (see
WatermarkSettingsabove)
Rendering
- Convert bitmaps to CMYK:
Bitmap::ConvertFormat(..., e_DIBCmyk)converts RGB / ARGB / RGB32 (and related) bitmaps directly to CMYK. - Improved CMYK page rendering performance (same-document retest: about 86% reduction on Win32, about 19% on Win64)
- Improved decoding of halftone JBIG2 images with HENABLESKIP
Forms and Annotations
- Batch annotation hit-testing by rectangle:
PDFPage::GetAnnotsAtRect/GetAnnotsAtDeviceRect, complementing existing point hit-testing; annotations with Hidden / NoView / Invisible flags are not returned.
Standards and Compliance
- PDF/A-4e / PDF/A-4f: Added validation and conversion. Upgrade to the Compliance resource pack that ships with this release.
Accessibility
- Accessibility check, fix, navigation, and tag tree: Publicized
AccessibilityChecker,AccessibilityFixer,AccessibilityNavigator,ReadingOrder,TagTreeEditor, and related APIs. - Improved AutoTagging structure recognition: better heading levels (such as H1/H2) and less overly flat structure trees, closer to common reader tagging results.
Document and Page
- Improved document open performance in specific scenarios (sample about 99.7% reduction)
- Add image frames from a file path:
Image::AddFrameaccepts an image file path. - SVG / WMF (EMF) vector graphics into PDF: Write SVG / WMF (EMF) into a PDF page or whole document via
VectorGraphics.
Bug Fixes
Conversion
- Fixed font drift and incorrect font sizes in DWG2PDF when specific fonts were missing (can be mitigated/fixed by adding the corresponding
.shxfonts to the engine Fonts directory) - Fixed execution failures/crashes in Windows Java DWG2PDF caused by conflicts between the ODA export component and JDK bundled runtimes
- Fixed garbled text in parts of specific DWG drawings after conversion to PDF
- Fixed garbled text in DWG2PDF output from historical versions
- Fixed DWG2PDF output losing original drawing layer information
- Fixed line weight and related attributes not being preserved correctly after DWG2PDF conversion
- Fixed unexpected font substitution for some fonts during PDF to Word / Excel
- Fixed Office2PDF incorrectly reporting “No 3D module right” when fonts were missing; the error message is now accurate
- Fixed garbled text (shown as “?”) after converting specific DWG files on Linux
- Fixed overlapping/squeezed lines after converting specific DWG files
- Fixed crashes in Linux Java when combining OCR and PDF2Word engine workflows
Rendering
- Fixed incorrect knockout transparency-group shape calculation that made preview results inconsistent with Adobe / WPS
- Fixed rendering of specific XFA documents that was inconsistent with Adobe
- Fixed some text appearing bolder and abnormal anti-aliasing in Output Preview (regression relative to v11.1)
- Fixed bordered link annotations not showing borders during rendering / image export
- Fixed results inconsistent with Adobe after enabling simulated overprint (
EnableSimulateOverprint)
Document and Page
- Fixed excessively long PDF/A validation and incomplete validation output after adding FreeText annotations with embedded fonts
- Fixed garbled output when writing certain Unicode symbols into headers/footers from C# (not reproducible on the C++ side)
- Fixed possible hangs or stack overflows from
Bookmark::MoveToon structurally abnormal PDFs; the API now returns errors more robustly - Fixed unexpected results when moving a bookmark node to become a sibling of its parent
- Fixed page width/height not updating after setting PageBox when re-read (use the correct path including
PDFPage::Normalize()where applicable)
OCR
- Fixed text position drift and ghosting after OCR on specific documents
- Fixed upside-down OCR results on specific pages
- Fixed flipped or 90°-rotated OCR results on specific pages
Text and Content
- Fixed intermittent errors from
PDFPage::AddText - Fixed invisible text after replacing Japanese with English using TextSearchReplace
- Fixed rare characters not displaying when creating text objects with SimSun-ExtB, and incorrect
IsCharSupportedresults - Fixed
TextPage.GetTextreturning different results on .NET Core versus .NET Framework - Fixed inaccurate
Font::IsCharSupportedresults for some fonts (such as HanaMinA)
Platform
- Fixed heap-corruption style crashes on Linux (for example Ubuntu 24) in specific licensing scenarios
- Fixed .NET on Linux ARM failing to load
fsdk.dllwhen callingTextPage.GetChars - Fixed document object misalignment / format corruption under concurrent editing
Signature and Security
- Fixed incorrect position of the last character in watermark strings after calling
embed()on the watermark font - Fixed Adobe reporting errors on specific pages after EmbedFont-related flows
- Fixed Chinese tiled watermarks not displaying on Linux when fonts were loaded from a path
Printing
- Fixed possible Access Violation on application exit if
PrintManager.Releasewas not called - Fixed PrintManager incorrectly using an already-closed printer handle on release/close paths
Forms and Annotations
- Fixed missing
/Lengthentries when exporting stamps added through the SDK to FDF - Fixed
XFADoc::FlattenTodropping field values that contain diacritics
Optimization
- Fixed inconsistent Optimizer handling of already-subset / non-embedded fonts that caused some fonts to be substituted