We're pleased to announce the release of Spire.PDF 12.7.8. This version fixes an issue where an "OFD parsing failed" exception was thrown during the conversion process. It also improves the stability of PDF processing. More details are listed below.

Here is a list of changes made in this release

Category ID Description
Bug Fix - Fixed an issue where applying multiple licenses failed to take effect.
Bug Fix SPIREPDF-8062 Fixed an issue where the print job name was incorrect when sending a PDF to a virtual printer.
Bug Fix SPIREPDF-8089 Fixed an issue where extracted text from PDF pages contained duplicated content.
Bug Fix SPIREPDF-8105 Fixed an issue where an "OFD parsing failed" exception was thrown when converting OFD to PDF.
Click the link below to download Spire.PDF 12.7.8:
More information of Spire.PDF new release or hotfix:

We are pleased to announce the release of Spire.Presentation for Java 11.7.2. This version supports converting PowerPoint to pure HTML format and fixes two issues while converting PowerPoint to PDF. Details are listed below.

Here is a list of changes made in this release

Category ID Description
New Feature - Added support for converting PowerPoint to pure HTML format (Note: Some unsupported elements are rendered as SVG).
Presentation ppt = new Presentation();
ppt.loadFromFile(inputFile);
ppt.getSaveToHtmlOption().setPureHtml(true);
ppt.saveToFile(outputFile, FileFormat.HTML);
ppt.dispose();
Bug Fix SPIREPPT-2939 Fixed an issue where images turned white when converting PowerPoint to PDF.
Bug Fix SPIREPPT-3157 Fixed an issue where text line wrapping was incorrect when converting PowerPoint to PDF.
Click the link below to download Spire.Presentation for Java 11.7.2:

We're pleased to announce the release of Spire.XLS 16.7.0. This version successfully fixes the issues where macros were lost when copying worksheets, a spelling error occurred in the enumeration type, and formula calculations returned incorrect values. More details are listed below.

Here is a list of changes made in this release

Category ID Description
Bug Fix - Fixes the issue where macros were lost when copying worksheets.
Bug Fix - Fixes a spelling error in the enumeration type.
Bug Fix - Fixes the issue where formula calculations returned incorrect values.
Click the link below to download Spire.XLS for C++ 16.7.0:

We’re pleased to announce the release of Spire.XLS for Python 16.7.1. This version adds support for Data Simulation Analysis (Scenario Manager), Slicers, and Excel to JSON conversion, expanding data analysis and processing capabilities. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New Feature SPIREXLS-6020 Added support for Data Simulation Analysis (Scenario Manager), including creation, editing, deletion, summary generation, and merging.
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
scenarios = worksheet.Scenarios
currentChangePercentage_Values = [0.23, 0.8, 1.1, 0.5, 0.35, 0.2]
increasedChangePercentage_Values = [0.45, 0.56, 0.9, 0.5, 0.58, 0.43]
decreasedChangePercentage_Values = [0.3, 0.2, 0.5, 0.3, 0.5, 0.23]
currentQuantity_Values = [1500, 3000, 5000, 4000, 500, 4000]
increasedQuantity_Values = [1000, 5000, 4500, 3900, 10000, 8900]
decreasedQuantity_Values = [1000, 2000, 3000, 3000, 300, 4000]
scenarios.Add("Current % of Change", worksheet.Range["F5:F10"], currentChangePercentage_Values)
scenarios.Add("Increased % of Change", worksheet.Range["F5:F10"], increasedChangePercentage_Values)
scenarios.Add("Decreased % of Change", worksheet.Range["F5:F10"], decreasedChangePercentage_Values)
scenarios.Add("Current Quantity", worksheet.Range["D5:D10"], currentQuantity_Values)
scenarios.Add("Increased Quantity", worksheet.Range["D5:D10"], increasedQuantity_Values)
scenarios.Add("Decreased Quantity", worksheet.Range["D5:D10"], decreasedQuantity_Values)
wb.SaveToFile(outputFile, ExcelVersion.Version2013)
wb.Dispose()
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
scenarios = worksheet.Scenarios
currentChangePercentage_Values = [0.23, 0.8, 1.1, 0.5, 0.35, 0.2]
increasedChangePercentage_Values = [0.45, 0.56, 0.9, 0.5, 0.58, 0.43]
decreasedChangePercentage_Values = [0.3, 0.2, 0.5, 0.3, 0.5, 0.23]
currentQuantity_Values = [1500, 3000, 5000, 4000, 500, 4000]
increasedQuantity_Values = [1000, 5000, 4500, 3900, 10000, 8900]
decreasedQuantity_Values = [1000, 2000, 3000, 3000, 300, 4000]
scenarios.Add("Current % of Change", worksheet.Range["F5:F10"], currentChangePercentage_Values)
scenarios.Add("Increased % of Change", worksheet.Range["F5:F10"], increasedChangePercentage_Values)
scenarios.Add("Decreased % of Change", worksheet.Range["F5:F10"], decreasedChangePercentage_Values)
scenarios.Add("Current Quantity", worksheet.Range["D5:D10"], currentQuantity_Values)
scenarios.Add("Increased Quantity", worksheet.Range["D5:D10"], increasedQuantity_Values)
scenarios.Add("Decreased Quantity", worksheet.Range["D5:D10"], decreasedQuantity_Values)
worksheet.Scenarios.Summary(worksheet.Range["L7"])
wb.SaveToFile(outputFile, ExcelVersion.Version2013)
wb.Dispose()
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
scenarios = worksheet.Scenarios
scenario1 = scenarios[0]
scenario2 = scenarios[1]
scenario1.SetVariableCells(worksheet.Range["A1:A5"], scenario2.Values)
sourceCell = worksheet.Range["B1:B5"]
scenario2.SetVariableCells(sourceCell, scenario2.Values)
scenario1.Show()
scenario2.Show()
self.get_content(scenario1, outputFile_TXT)
wb.SaveToFile(outputFile, ExcelVersion.Version2013)
wb.Dispose()
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
scenarios = worksheet.Scenarios
scenarios.RemoveScenarioAt(0)
scenarios.RemoveScenarioByName("two")
content = ""
content += "Count:" + str(scenarios.Count) + "\n"
content += "ContainsScenario:" + str(scenarios.ContainsScenario("two")) + "\n"
content += "ContainsScenario:" + str(scenarios.ContainsScenario("one")) + "\n"
with open(outputFile, 'w') as f:
f.write(content)
wb.Dispose()
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
scenarios = worksheet.Scenarios
scenarios.RemoveScenarioAt(0)
scenarios.RemoveScenarioByName("two")
content = ""
content += "Count:" + str(scenarios.Count) + "\n"
content += "ContainsScenario:" + str(scenarios.ContainsScenario("two")) + "\n"
content += "ContainsScenario:" + str(scenarios.ContainsScenario("one")) + "\n"
with open(outputFile, 'w') as f:
f.write(content)
wb.Dispose()
New Feature - Added support for adding Slicers using table data.
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
slicers = worksheet.Slicers
table = worksheet.ListObjects.Create("Super Table", worksheet.Range["A1:C9"])
count = 3
for type in SlicerStyleType.dict.values():
if isinstance(type, SlicerStyleType):
count += 5
rangeStr = "E" + str(count)
index = slicers.Add(table, rangeStr, 0)
xlsSlicer = slicers[index]
xlsSlicer.Name = "slicers_" + str(count)
xlsSlicer.StyleType = type
wb.SaveToFile(outputFile_xlsx, ExcelVersion.Version2013)
wb.Dispose()
New Feature - Added support for adding Slicers using PivotTable data.
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
pt = sheet.PivotTables[0]
slicers = worksheet.Slicers
index = slicers.Add(pt, "E12", 0)
xlsSlicer = slicers[index]
xlsSlicer.Name = "test_xlsSlicer"
xlsSlicer.Width = 100
xlsSlicer.Height = 120
xlsSlicer.StyleType = SlicerStyleType.SlicerStyleLight2
xlsSlicer.PositionLocked = True
slicerCache = xlsSlicer.SlicerCache
slicerCache.CrossFilterType = SlicerCacheCrossFilterType.ShowItemsWithNoData
slicerCacheItems = xlsSlicer.SlicerCache.SlicerCacheItems
xlsSlicerCacheItem = slicerCacheItems[0]
xlsSlicerCacheItem.Selected = False
slicers_2 = worksheet.Slicers
r1 = pt.PivotFields["year"]
index_2 = slicers_2.Add(pt, "I12", r1)
xlsSlicer_2 = slicers[index_2]
xlsSlicer_2.RowHeight = 40
xlsSlicer_2.StyleType = SlicerStyleType.SlicerStyleLight3
xlsSlicer_2.PositionLocked = False
slicerCache_2 = xlsSlicer_2.SlicerCache
slicerCache_2.CrossFilterType = SlicerCacheCrossFilterType.ShowItemsWithDataAtTop
slicerCacheItems_2 = xlsSlicer_2.SlicerCache.SlicerCacheItems
xlsSlicerCacheItem_2 = slicerCacheItems_2[1]
xlsSlicerCacheItem_2.Selected = False
pt.CalculateData()
wb.SaveToFile(outputFile_xlsx, ExcelVersion.Version2013)
wb.Dispose()
New Feature - Added support for removing Slicers.
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet_1 = wb.Worksheets[0]
slicers = worksheet_1.Slicers
slicers.RemoveAt(0)
slicer = worksheet_1.Slicers[1]
worksheet_1.Slicers.Remove(slicer)
worksheet_2 = wb.Worksheets[2]
worksheet_2.Slicers.Clear()
wb.SaveToFile(outputFile_xlsx, ExcelVersion.Version2013)
New Feature - Added support for modifying Slicers.
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
slicers = worksheet.Slicers
xlsSlicer = slicers[0]
xlsSlicer.StyleType = SlicerStyleType.SlicerStyleDark4
xlsSlicer.Caption = "Slicer"
xlsSlicer.PositionLocked = True
slicerCacheItems = xlsSlicer.SlicerCache.SlicerCacheItems
xlsSlicerCacheItem = slicerCacheItems[0]
xlsSlicerCacheItem.Selected = False
displayValue = xlsSlicerCacheItem.DisplayValue
slicerCache = xlsSlicer.SlicerCache
slicerCache.CrossFilterType = SlicerCacheCrossFilterType.ShowItemsWithNoData
wb.SaveToFile(outputFile_xlsx, ExcelVersion.Version2013)
New Feature - Added support for retrieving Slicer information.
wb = Workbook()
wb.LoadFromFile(inputFile)
worksheet = wb.Worksheets[0]
slicers = worksheet.Slicers
content = ""
content += "slicers.Count:" + str(slicers.Count) + "\n"
xlsSlicer = slicers[1]
content += "xlsSlicer.Name:" + xlsSlicer.Name + "\n"
content += "xlsSlicer.Caption:" + xlsSlicer.Caption + "\n"
content += "xlsSlicer.NumberOfColumns:" + str(xlsSlicer.NumberOfColumns) + "\n"
content += "xlsSlicer.ColumnWidth:" + str(xlsSlicer.ColumnWidth) + "\n"
content += "xlsSlicer.RowHeight:" + str(xlsSlicer.RowHeight) + "\n"
content += "xlsSlicer.ShowCaption:" + str(xlsSlicer.ShowCaption) + "\n"
content += "xlsSlicer.PositionLocked:" + str(xlsSlicer.PositionLocked) + "\n"
content += "xlsSlicer.Width:" + str(xlsSlicer.Width) + "\n"
content += "xlsSlicer.Height:" + str(xlsSlicer.Height) + "\n"
slicerCache = xlsSlicer.SlicerCache
content += "slicerCache.SourceName:" + slicerCache.SourceName + "\n"
content += "slicerCache.IsTabular:" + str(slicerCache.IsTabular) + "\n"
content += "slicerCache.Name:" + slicerCache.Name + "\n"
slicerCacheItems = slicerCache.SlicerCacheItems
xlsSlicerCacheItem = slicerCacheItems[1]
content += "xlsSlicerCacheItem.Selected:" + str(xlsSlicerCacheItem.Selected) + "\n"
with open(outputFile_T, 'w') as f:
f.write(content)
wb.Dispose()
New Feature SPIREXLS-6162 Added support for converting Excel files to JSON data.
workbook = Workbook()
workbook.LoadFromFile(inputFile)
workbook.SaveToFile(outputFile, FileFormat.Json)
workbook.Dispose()
Click the link below to download Spire.XLS for Python 16.7.1:

We’re pleased to announce the release of Spire.PDF for Python 12.7.0. This version introduces the AutoFontSize property, which enables automatic resizing of text content to fit within a signature field. Additionally, it fixes a font issue that occurred when replacing text. Further details are provided below.

Here is a list of changes made in this release

Category ID Description
New Feature SPIREPDF-7319 Added the AutoFontSize property to support auto-fitting text content to the size of a signature field.
# Initialize a PDF document object
doc = PdfDocument()

# Load the PDF file that needs to be signed
doc.LoadFromFile(inputFile)

# Specify the password for the PFX certificate file
pfxPassword = "e-iceblue"

# Get the first page of the document
page = doc.Pages.get_Item(0)

# Create an ordinary signature maker using the certificate file
signatureMaker = PdfOrdinarySignatureMaker(doc, inputFile_pfx, pfxPassword)

# Set the signature validation layer (False indicates displaying the validity symbol)
signatureMaker.SetAcro6Layers(False)

# Get the signature object and configure the basic information of the signer
signature = signatureMaker.Signature
signature.Name = "Gary"              # Signer's name
signature.ContactInfo = "028-81705109" # Contact information
signature.Location = "Chengdu"       # Signature location
signature.Reason = "The certificate of this document" # Reason for signing

# Create a custom signature appearance object
appearance = PdfSignatureAppearance(signature)
appearance.NameLabel = "Signer: "          # Name label
appearance.ContactInfoLabel = "ContactInfo: " # Contact information label
appearance.LocationLabel = "Location: "    # Location label
appearance.ReasonLabel = "Reaseon: "       # Reason label
appearance.SignatureImage = PdfImage.FromFile(inputFile_image) # Load the signature image
appearance.GraphicMode = GraphicMode.SignImageAndSignDetail # Set to display both the signature image and detailed information
signature.DocumentPermissions = PdfCertificationFlags.ForbidChanges # Set document permissions to forbid changes
appearance.SignImageLayout = SignImageLayout.Stretch # Set the layout mode of the signature image to stretch
appearance.AutoFontSize = True  # Enable auto font size adjustment for text

# Generate and apply the signature at the specified position on the page (Parameters in order: signature field name, page, X coordinate, Y coordinate, width, height, appearance object)
signatureMaker.MakeSignature("signName", page, 54.0, page.Size.Height - 300.0, 40.0, 40.0, appearance)

# Save the signed PDF document
doc.SaveToFile(outputFile)

# Close the document and release resources
doc.Close()
Bug Fix SPIREPDF-8056 Fixed the issue where the font was incorrect after text replacement.
Click the link to download Spire.PDF for Python 12.7.0:

We're pleased to announce the release of Spire.Presentation for C++ 11.7.0. This version fixes several issues related to PowerPoint document splitting, PDF conversion, and document loading, improving the overall stability of PowerPoint processing. More details are listed below.

Here is a list of changes made in this release

Category ID Description
Bug Fix - Fixed an issue where the output file size increased after splitting a PowerPoint document.
Bug Fix - Fixed a text shape position shift when converting PowerPoint documents to PDF.
Bug Fix - Fixed an Arg_NullReferenceException thrown when loading a PowerPoint document.
Click the link below to download Spire.Presentation for C++ 11.7.0:

We're pleased to announce the release of Spire.OfficeJS 11.6.5. This release upgrades the product's underlying architecture and adjusts the release package structure. Details are listed below

Here is a list of changes made in this release

Category ID Description
Optimization - Upgraded the product's underlying architecture to improve document loading and display speed.
Optimization - Adjusted the release package structure.
Click the link to download Spire.OfficeJS 11.6.5:

We're pleased to announce the release of Spire.Office for JavaScript 11.7.0. This version supports converting Word documents directly to XLSX format and operating on format revision information. Meanwhile, it also supports setting the data label position for charts and adding, modifying, or deleting SmartArt graphics. More details are listed below.

Here is a list of changes made in this release

Category ID Description
New Feature - Supports converting Word directly to XLSX format.
 let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.XLSX});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Supports operating on format revision information.
 let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        let revisionInfoCollection = doc.GetRevisionInfos();
        for (let i = 0; i < revisionInfoCollection.Count; i++) {
            let revisionInfo = revisionInfoCollection.get_Item(i);
            if (revisionInfo.RevisionType === spiredoc.RevisionType.FormatChange)
             {
                revisionInfo.Reject();  // or Accept()
                i--;
            }
        }
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Supports setting "Automatically adjust right indent when document grid is defined".
 let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        let section = doc.Sections.get_Item(0);
        let para1 = section.Paragraphs.get_Item(2);
        para1.Format.AdjustRightIndent = true;
        section.AddParagraph();
        let para3 = section.Paragraphs.get_Item(7);
        para3.AppendText("News Line Sample");
        para3.Format.AdjustRightIndent = true;
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Paragraph class adds the AppendSmartArt method, supporting appending SmartArt graphics in paragraphs.
 let document = new spiredoc.Document();
        let section = document.AddSection();
        let paragraph = section.AddParagraph();
        paragraph.Format.HorizontalAlignment = spiredoc.HorizontalAlignment.Center;
        let textRange = paragraph.AppendText("RepeatingBendingProcess");
        textRange.CharacterFormat.FontSize = 28;
        textRange.CharacterFormat.FontName = "Times New Roman";
        paragraph = section.AddParagraph();
        paragraph = section.AddParagraph();
        paragraph.Format.HorizontalAlignment = spiredoc.HorizontalAlignment.Center;
        let shape = paragraph.AppendSmartArt(spiredoc.SmartArtType.RepeatingBendingProcess, 432, 252);
        let repeatingBendingSmartArt = shape.SmartArt;
        let process1 = repeatingBendingSmartArt.Nodes.get_Item(0);
        process1.Text = "1";
        if (process1.Paragraphs.get_Item(0).ChildObjects.get_Item(0) instanceof spiredoc.TextRange) {
            process1.Paragraphs.get_Item(0).ChildObjects.get_Item(0).CharacterFormat.FontName = "Calibri";
            process1.Paragraphs.get_Item(0).ChildObjects.get_Item(0).CharacterFormat.FontSize = 20;
            process1.Paragraphs.get_Item(0).ChildObjects.get_Item(0).CharacterFormat.TextColor = spiredoc.Color.FromArgb(220, 20, 60);
        }
        repeatingBendingSmartArt.UpdateSmartArt();
        document.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        document.Close();
New Feature - Supports hiding table rows.
 let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        let table = doc.FirstSection.Body.Tables.get_Item(0);
        let firstRow = table.FirstRow;
        firstRow.Hidden = true;
        // Verify CharacterFormat.Hidden of all elements in the row
        for (let c = 0; c < row.Cells.Count; c++) {
            let cell = row.Cells.get_Item(c);
            for (let p = 0; p < cell.Paragraphs.Count; p++) {
                let para = cell.Paragraphs.get_Item(p);
                for (let r = 0; r < para.ChildObjects.Count; r++) {
                    let run = para.ChildObjects.get_Item(r);
                    if (run instanceof spiredoc.TextRange) { ... }
                }
            }
        }
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Supports drawing underlines on trailing spaces.
 let doc = new spiredoc.Document();
        doc.CompatibilityOptions.UlTrailSpace = true;  // or false
        let sec = doc.AddSection();
        let para = sec.AddParagraph();
        let blanks = "(6)   ";
        let tr = para.AppendText(blanks);
        tr.CharacterFormat.UnderlineStyle = spiredoc.UnderlineStyle.Single;
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx2013});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
New Feature - Supports reading chart data (XValues / YValues).
let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        for (let s = 0; s < doc.Sections.Count; s++) {
            let sec = doc.Sections.get_Item(s);
            for (let p = 0; p < sec.Paragraphs.Count; p++) {
                let paragraph = sec.Paragraphs.get_Item(p);
                for (let i = 0; i < paragraph.ChildObjects.Count; i++) {
                    let obj = paragraph.ChildObjects.get_Item(i);
                    if (obj instanceof spiredoc.ShapeObject) {
                        let shape = obj;
                        let chart = shape.Chart;
                        // Read X-axis data
                        for (let x = 0; x < chart.XValues.Count; x++) {
                            let xVal = chart.XValues.get_Item(x);
                        }
                        // Read Y-axis data
                        let series = chart.Series.get_Item(0);
                        for (let y = 0; y < series.YValues.Count; y++) {
                            let yVal = series.YValues.get_Item(y);
                        }
                    }
                }
            }
New Feature - Supports obtaining document revision information.
 let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        let revisionInfoCollection = doc.GetRevisionInfos();
        for (let i = 0; i < revisionInfoCollection.Count; i++) {
            let revisionInfo = revisionInfoCollection.get_Item(i);
            // Get revision information
            let author = revisionInfo.Author;
            let revisionType = revisionInfo.RevisionType;
            let dateTime = revisionInfo.DateTime;
            let ownerObjType = revisionInfo.OwnerObject.DocumentObjectType;
            // Determine the target object type
            if (revisionInfo.OwnerObject instanceof spiredoc.TextRange) {
                let range = revisionInfo.OwnerObject;
            }
        }
        doc.Dispose();
New Feature - Supports document compatibility option settings.
let doc = new spiredoc.Document();
        // Set individual compatibility options
        doc.CompatibilityOptions.UlTrailSpace = false;
        doc.CompatibilityOptions.AdjustLineHeightInTable = true;
        doc.CompatibilityOptions.SpaceForUL = true;
        doc.CompatibilityOptions.ApplyBreakingRules = true;
        doc.CompatibilityOptions.DoNotExpandShiftReturn = false;
        doc.CompatibilityOptions.OverrideTableStyleFontSizeAndJustification = false;
        doc.CompatibilityOptions.DoNotAutofitConstrainedTables = true;
        // Optimize for a specific Word version
        doc.CompatibilityOptions.OptimizeForWordVersion(spiredoc.WordVersion.Word2016);
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx2016});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Supports setting "Kerning for fonts".
  let doc = new spiredoc.Document();
        let sec = doc.AddSection();
        for (let item of testData) {
            let pa = sec.AddParagraph();
            let textRange = pa.AppendText(item.text);
            textRange.CharacterFormat.Kerning = item.kerning;
        }
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Supports setting text direction (Horizontal in Vertical).
let doc = new spiredoc.Document();
        let section = doc.AddSection();
        section.TextDirection = spiredoc.TextDirection.RightToLeft;
        let paragraph = section.AddParagraph();
        let range = paragraph.AppendText("text");
        let farEastLayout2 = paragraph.AppendText("34");
        let style = new spiredoc.FarEastLayout();
        style.Vertical = true;
        farEastLayout2.CharacterFormat.FarEastLayout = style;
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Doc});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Close();
New Feature - Supports extracting SmartArt-related information.
 let document = new spiredoc.Document();
        document.LoadFromFile(inputFileName);
        for (let s = 0; s < document.Sections.Count; s++) {
            let section = document.Sections.get_Item(s);
            for (let p = 0; p < section.Paragraphs.Count; p++) {
                let paragraph = section.Paragraphs.get_Item(p);
                for (let c = 0; c < paragraph.ChildObjects.Count; c++) {
                    let childObj = paragraph.ChildObjects.get_Item(c);
                    if (childObj instanceof spiredoc.Shape && childObj.HasSmartArt) {
                        let smartArt = childObj.SmartArt;
                        // Get SmartArt type
                        let type = smartArt.SmartArtType;
                        // Get background fill
                        let bgFillType = smartArt.BackgroundFill.FillType;
                        // Traverse nodes
                        for (let n = 0; n < smartArt.Nodes.Count; n++) {
                            let node = smartArt.Nodes.get_Item(n);
                            // Node text, font, shape properties
                            node.Text;
                            node.ShapeProperties.get(0).Fill.FillType;
                            node.ShapeProperties.get(0).Fill.Color;
                            node.ShapeProperties.get(0).LineFormat.Fill.FillType;
                        }
                    }
                }
            }
        }
        document.Dispose();
New Feature - Supports switching the revision view to compare style changes before and after.
 let doc = new spiredoc.Document();
        doc.LoadFromFile(inputFileName);
        let revisionInfoCollection = doc.GetRevisionInfos();
        for (let i = 0; i < revisionInfoCollection.Count; i++) {
            let revisionInfo = revisionInfoCollection.get_Item(i);
            if (revisionInfo.RevisionType === spiredoc.RevisionType.FormatChange) {
                if (revisionInfo.OwnerObject instanceof spiredoc.TextRange) {
                    let range = revisionInfo.OwnerObject;
                    doc.RevisionsView = spiredoc.RevisionsView.Original;
                    // Read Original style
                    let bold = range.CharacterFormat.Bold;
                    doc.RevisionsView = spiredoc.RevisionsView.Final;
                    // Read Final style
                    let color = range.CharacterFormat.TextColor;
                }
            }
        }
        doc.Close();
New Feature - Supports chart datalabel position settings.
 let doc = new spiredoc.Document();
        for (let pos of positions) {
            let section = doc.AddSection();
            let newPara = section.AddParagraph();
            let shape = newPara.AppendChart(spiredoc.ChartType.Pie, 500, 300);
            let chart = shape.Chart;
            chart.Series.get_Item(0).HasDataLabels = true;
            chart.Series.get_Item(0).DataLabels.ShowCategoryName = true;
            chart.Series.get_Item(0).DataLabels.ShowValue = true;
            chart.Series.get_Item(0).DataLabels.Position = pos;
        }
        doc.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, outputFile);
        doc.Dispose();
New Feature - Supports modifying SmartArt graphics.
 let document = new spiredoc.Document();
        document.LoadFromFile(inputFileName);
        let paragraph = document.LastParagraph;
        let shape1 = paragraph.ChildObjects.get_Item(0);
        let smartArt = shape1.SmartArt;
        // Modify background fill
        smartArt.BackgroundFill.FillType = spiredoc.FillType.Solid;
        smartArt.BackgroundFill.Color = spiredoc.Color.FromArgb(255, 242, 169, 132);
        // Modify node text
        let node = smartArt.Nodes.get_Item(0);
        node.Text = "Goals";
        // Modify node fill
        let shape = node.ShapeProperties.get(0);
        shape.Fill.FillType = spiredoc.FillType.Solid;
        shape.Fill.Color = spiredoc.Color.FromArgb(255, 160, 43, 147);
        shape.LineFormat.Fill.FillType = spiredoc.FillType.Solid;
        shape.LineFormat.Fill.Color = spiredoc.Color.FromArgb(255, 160, 43, 147);
        // Add new node
        let newNode = smartArt.Nodes.Add();
        newNode.Text = "Map";
        smartArt.UpdateSmartArt();
        document.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, fullOutputPath);
        document.Close();
New Feature - Supports deleting SmartArt graphics.
 let document = new spiredoc.Document();
        document.LoadFromFile(inputFileName);
        for (let j = 0; j < document.Sections.get_Item(0).Paragraphs.Count; j++) {
            let paragraph = document.Sections.get_Item(0).Paragraphs.get_Item(j);
            for (let i = 0; i < paragraph.ChildObjects.Count; i++) {
                let childObj = paragraph.ChildObjects.get_Item(i);
                try {
                    let smartArt = childObj.SmartArt;
                    if (smartArt != null) {
                        paragraph.Items.RemoveAt(i);
                        i--;
                    }
                } catch (e) { }
            }
        }
        document.SaveToFile({fileName: outFileName, fileFormat: spiredoc.FileFormat.Docx});
        spire.copyFileFromFSToLocalStorage(outFileName, fullOutputPath);
        document.Close();
Click the link to download Spire.Office for JavaScript 11.7.0:

E-iceblue today announced the official release of Spire.Agent.Office, an AI Agent-powered document processing component designed for enterprise systems and developers. It enables natural language-driven document intelligence to be embedded into applications and workflows, supporting end-to-end operations across Word, Excel, PowerPoint, and PDF files, including creation, editing, conversion, and review.

Spire.Agent.Office is composed of four specialized modules: Spire.Agent.Doc, Spire.Agent.XLS, Spire.Agent.Presentation, and Spire.Agent.PDF. Each module can be used independently or integrated as a unified suite, helping development teams rapidly build AI-driven document automation capabilities.

Spire.Agent.Doc

Spire.Agent.Doc is an AI Agent for Word document processing that enables document creation, editing, processing, and review through natural language instructions. It supports generating reports, contracts, proposals, and manuals, along with capabilities such as content refinement, format standardization, multi-format conversion, and information extraction.

Spire.Agent.XLS

Spire.Agent.XLS is an AI Agent for Excel spreadsheet processing that enables spreadsheet creation, data processing, analysis, formatting, and conversion via natural language instructions. It supports automated reporting, data cleaning, formula construction, and multi-format export.

Spire.Agent.Presentation

Spire.Agent.Presentation is an AI Agent that integrates natural language processing with the full capabilities of the Spire.Presentation API, enabling automated presentation generation, editing, and management. It allows developers to perform slide operations, content updates, media embedding, data visualization, and file conversion through AI-driven commands while maintaining full programmatic control.

Spire.Agent.PDF

Spire.Agent.PDF is an AI Agent for PDF document processing, providing capabilities for document assembly, security, validation, transformation, extraction, and delivery. It supports operations such as merging, splitting, encryption, format conversion, and data extraction for enterprise document workflows.

Download Spire.Agent.Office now to get started:

Contact Us


We’re pleased to announce the release of Spire.PDF for Java 12.7.0. This version fixes several issues related to digital signatures, PDF processing, and conversion stability. It also optimizes memory usage when replacing document content. More details are listed below.

Here is a list of changes made in this release

Category ID Description
Bug Fix SPIREPDF-5182 Fixed an issue where signature verification failed after adding a digital signature.
Bug Fix SPIREPDF-7065 Fixed an issue with the signature error “Undefined length encoding”.
Bug Fix SPIREPDF-7547 Optimized memory consumption when replacing document content.
Bug Fix SPIREPDF-8095 Fixed an issue where project packaging failed under Java 21.
Bug Fix SPIREPDF-8096 Fixed a “NullPointerException” when compressing PDF files.
Bug Fix SPIREPDF-8099 Fixed an “ArrayIndexOutOfBoundsException” when converting PDF to images.
Click the link below to download Spire.PDF for Java 12.7.0:
Page 6 of 29