@fuxinsoft/foxit-pdf-sdk-node
v11.1.0
Published
Foxit PDF SDK For Node.js.
Downloads
142
Readme
Foxit PDF SDK v11.1 Release Date: 31 March 2026
Breaking Changes
The following changes require code updates when upgrading from v11.0. Existing projects that use these APIs will not compile or may behave differently without modification.
ActionCallback — Parameter change and new pure virtual methods
The ActionCallback class has 1 parameter change and 7 new pure virtual methods. Any subclass must be updated.
Parameter change — GetPageWindowRect now requires document and page_index parameters:
// v11.0
virtual RectF GetPageWindowRect() = 0;
// v11.1
virtual RectF GetPageWindowRect(const foxit::pdf::PDFDoc document, int page_index) = 0;New pure virtual methods — implement with empty bodies if the functionality is not needed:
virtual void NotifyBeginDoJob(const pdf::PDFDoc document,
JavascriptModifyItemInfo::JavascriptEventType event_type) = 0;
virtual void NotifyAfterDataChange(const pdf::PDFDoc document,
JavascriptModifyItemInfo modify_item_info) = 0;
virtual void NotifyEndDoJob(const pdf::PDFDoc document,
JavascriptModifyItemInfo::JavascriptEventType event_type) = 0;
virtual bool InitModifyItem(const pdf::PDFDoc document,
ModifyItemType item_type, int page_index, const WString dict_name) = 0;
virtual void ResetModifyItem(const pdf::PDFDoc document) = 0;
virtual int GetVisiblePageCount(const pdf::PDFDoc document) = 0;
virtual int GetVisiblePage(const pdf::PDFDoc document, int index) = 0;DocProviderCallback — New pure virtual method (XFA)
A new pure virtual method is added. Subclasses of DocProviderCallback must implement it:
virtual void NotifyWidgetChangeInfo(const XFADoc doc, XFAWidgetModifyInfo change_info) = 0;This only affects projects that use the XFA module. Implement with an empty body if not needed.
IconProviderCallback::GetIcon — Parameter change (silent)
The GetIcon method has changed. This is not a pure virtual, so compilation will succeed, but existing overrides will silently stop being called:
// v11.0
virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color);
// v11.1
virtual PDFPage GetIcon(Annot::Type annot_type, const char* icon_name, ARGB color,
foxit::pdf::objects::PDFDictionary* annot_dict);Action required: Update the override to include the new annot_dict parameter. Enable -Woverloaded-virtual (GCC/Clang) or /W4 (MSVC) to detect this at compile time.
OCRCallback — New pure virtual method
A new pure virtual method IsImageIgnored is added to the existing OCRCallback class:
// v11.0
class OCRCallback {
virtual bool NeedToCancelNow(const wchar_t* info) = 0;
};
// v11.1
class OCRCallback {
virtual bool NeedToCancelNow(const wchar_t* info) = 0;
virtual bool IsImageIgnored(foxit::pdf::graphics::ImageObject* image_object) = 0; // NEW
};Action required: All subclasses of OCRCallback must implement IsImageIgnored. Return false to preserve previous behavior (no images ignored).
OCRConfig constructor and Set() — Parameter change
The parameterized constructor and Set() method gained 3 new required parameters:
// v11.0 (5 parameters)
OCRConfig(bool is_detect_pictures, bool is_remove_noise, bool is_correct_skew,
bool is_enable_text_extraction_mode, bool is_sequentially_process);
// v11.1 (8 parameters)
OCRConfig(bool is_detect_pictures, bool is_remove_noise, bool is_correct_skew,
bool is_enable_text_extraction_mode, bool is_sequentially_process,
bool is_auto_overwrite_resolution, int resolution_to_overwrite, int confidence);Action required: Add the 3 new parameters. Use true, 300, 0 for default-equivalent behavior. Alternatively, use the default constructor which initializes all fields with defaults.
OCR::OCRPDFPage / OCRPDFDocument / OCRConvertTo / OCRPDFDocuments — New parameter
All OCR processing methods add an OCRProgressCallback* parameter:
// v11.0
void OCRPDFPage(PDFPage pdf_page, bool is_editable);
void OCRPDFPage(PDFPage pdf_page, bool is_editable, const OCRConfig config);
// ... same pattern for OCRPDFDocument, OCRConvertTo, OCRPDFDocuments
// v11.1
void OCRPDFPage(PDFPage pdf_page, bool is_editable, OCRProgressCallback* callback = NULL);
void OCRPDFPage(PDFPage pdf_page, bool is_editable, const OCRConfig config, OCRProgressCallback* callback = NULL);- C++: Has default value
NULL— existing calls compile without changes. - C# / Python / Java / Node.js / Go: Bindings do not inherit the C++ default value. Existing calls must add the new parameter explicitly (pass
null/None/nilto preserve previous behavior).
PDF to Office — API parameter changes
The following conversion APIs have breaking changes in this release. For detailed migration guidance with code examples, see the Breaking Changes section in the Conversion SDK v3.1.0 Release Note (included in the Conversion SDK package).
PDF2WordSettingData— Add required parametermax_blank_paragraphs_per_page_bottom; default value ofenable_generate_headers_and_footerschanged fromfalsetotruePDF2PowerPointSettingData— Add required parameterenable_adapt_to_largest_pagePDF2ExcelSettingData— Add required parametersenable_aggressive_table_repairandinclude_watermarksPDF2OfficeSettingData— Add required parameterenable_matching_system_fonts- PDF-to-Word now preserves internal document navigation links by default## New Features and Enhancements
Platform
- Add Node.js v21 and v22 support (extends previous v18-20 range)
- Add Node.js macOS platform support
Conversion
- Add WPS-powered Office-to-PDF conversion on Windows via
Convert::FromWord/Excel/PowerPoint(..., e_Office2PdfEngineWps) - Add system font precise matching toggle for PDF-to-Word:
PDF2OfficeSettingData::enable_matching_system_fonts - Update PDF-to-Word to preserve internal document navigation links by default
- Add page size adaptation for PDF-to-PPT:
PDF2PowerPointSettingData::enable_adapt_to_largest_page - Add font embedding toggle for Linux Office2PDF:
Office2PDFSettingData::is_embed_font - Add version query APIs:
Office2PDF::GetVersion()/PDF2Office::GetVersion() - Update
Office2PDF::ConvertFromWordto support DOC (Word 97-2003) format
OCR
- Add progress callback via
OCRProgressCallbackclass withProgressNotify(int current_rate) - Add Arabic language support:
OCREngine::SetLanguages("Arabic") - Add configuration parameters:
OCRConfig::confidence(confidence threshold) andOCRConfig::resolution_to_overwrite(resolution override) - Add standalone command-line tool for multi-process parallel OCR:
ocr_win64.exe/ocr_linux64 - Add image filtering callback:
OCRCallback::IsImageIgnored(ImageObject*)
Rendering
- Add overprint rendering support:
Renderer::SetOverprint(bool is_to_enable_overprint)
Security and Signature
- Add pre-sign self-modification tracking callbacks in
ActionCallback:InitModifyItem(),ResetModifyItem(),NotifyBeginDoJob(),NotifyAfterDataChange(),NotifyEndDoJob(); addDocProviderCallback::NotifyWidgetChangeInfo()for XFA widget change tracking - Add
CertChainResolverCallbackandTrustedCertStoreCallbackfor cross-CA LTV enablement inLTVVerifier - Add
Redaction::EnableFileStream()to reduce memory peaks in high-redaction-volume scenarios via file stream
Forms and Annotation
- Add 29 XFA event types to
XFADoc::EventTypefor granular event handling (Click, Change, Enter, Exit, PreSign, PostSign, PreSave, PostSave, etc.) - Update
IconProviderCallback::GetIconwithannot_dictparameter for annotation dictionary access
Document and Page
- Update
ActionCallback::GetPageWindowRectwithdocumentandpage_indexparameters for multi-page JS layer (OCG) control - Add
ActionCallback::GetVisiblePageCount()andActionCallback::GetVisiblePage()for querying visible pages in multi-page view - Add methods to remove PDF logical structure tags:
PDFDoc::RemoveStructTree(),PDFStructTree::RemoveChild(),StructElement::RemoveChild() - Add
Font::IsCharSupported(uint32 unicode, const PDFDoc document)for character support detection - Add
Library::AddExternalFontPath()andLibrary::MatchExternalFontsOnly()for external font path management
3D
- Add
PDF3DContext::Add3DAnnot()to insert 3D annotation on a specified page (file path and ReaderCallback modes) - Add 3D preset view and model tree interaction:
PDF3DAnnotInstance::ApplyPresetView(),GetPresetViewList(),ModelNodeclass with visibility control
Optimization
- Add transparency optimization with configurable resolution modes (Low/Medium/High):
OptimizerSettings::SetTransparencyMode()
Bug Fixes
Conversion
- Fix PDF-to-Word crop marks at page corners causing translation software failures
- Improve PDF-to-Word cross-application rendering consistency between MS Office and WPS Office
- Fix PDF-to-Excel cell text placed inside shapes instead of cells
- Fix PDF-to-Excel table borders rendered as bitmaps overlaid on the table
- Fix PDF-to-Excel excessive conversion time with cells appearing as images
- Fix PDF-to-PPT page dimension changes with content shrunk to upper-left
- Fix
Office2PDF::ConvertFromWordcrash on specific DOCX files - Fix incorrect character spacing in Word-to-PDF causing wrong line breaks
- Fix bold text appearing excessively bold in Word-to-PDF output
- Fix missing text (last sentence lost) in Word-to-PDF output
- Fix shape rendering deviations and incorrect text line breaks in Word-to-PDF
OCR
- [Linux] Fix
OCRConvertTofailure (ERR_FREN_NO_PAGES) due to missing Chinese fonts - Fix
OCRConvertToerror (ERR_IMAGE_LIBJPEG_LIBRARY_RAISED_ERROR) on specific files - Fix
OCRConvertToonly outputting first page of a 44-page document
Rendering
- Fix incorrect CMYK-to-ARGB color conversion in Bitmap DIBFormat
- [Performance] Fix progressive rendering slowdown (17s->24s->30s->40s) with multiple open documents
- Fix
OutputPreview::SetSimulationProfile()not reflecting different ICC profiles - Fix missing text in OutputPreview rendering of specific PDFs
- Fix rendering inconsistencies with Adobe on specific PDF pages
- Fix crash when saving
Bitmapcreated withe_DIBRgbviaImage::SaveAs - Fix abnormal rendering when adding
PathObjectto specific document pages - Fix memory leak in
Bitmapconstructed from buffer wheredelete()did not free memory
Printing
- Fix color discrepancies and uneven dot patterns in PrintManager output
- Fix intermittent crash in multi-threaded PrintManager usage
- Fix
FXPM_AddPDFFromFileToJobandFXPM_SetJobDocumentNamenot supporting CJK paths - Fix
FXPM_SetJobDuplex(1)not enabling duplex printing - Fix mixed-orientation page content not rotating with page direction
- Fix
SetRotation()causing landscape PDFs to print with portrait text orientation - Fix PrintJob only printing first file when multiple files added via
AddPDFFromFile
Forms
- Fix XFA
ExportData/ImportDatacycle corrupting table headers and digital signatures - Fix XFA TextField Widget proliferation causing progressive load time increase and crash
- Fix C# ViewDemo rendering blank pages for specific XFA documents
- Fix JavaScript layer (OCG) visibility control having no effect
- [Regression] Fix
ActionCallbacktrigger regression in v11 where some callbacks did not fire after field modification - Fix "Inherit Zoom" bookmark destination only working for the first bookmark
Document and Page
- Fix crash when calling
SaveAswithe_SaveFlagLinearizedafterStartEmbedAllFonts - Fix
fxhtml2pdfzombie process afterHtml2PDFtimeout - [Performance] Fix
StartSplitByFileSizetaking over 1 hour for 25,000-page PDFs - Fix excessive Redaction memory peaks in high-redaction-volume continuous-processing scenarios
- [Windows] Fix
ComplianceEngine::SetTempFolderPath()writing to executable directory instead of system temp - Fix C#
TextPage.GetTextInRectreturning question marks for certain characters - Fix
GetEditingTextCaretPositionreturning incorrect positions causing misplaced IME candidate window
Other
- Fix visual artifacts from parallel multi-process Optimizer image compression
- Fix specific 3D PDF showing blank after clicking 3D annotation area
- Improve AutoTagging recognition of Figure-type images vs. Adobe Auto-Tag
- Fix incorrect content matching in Comparison for OCR documents
