Spire.PDF for Java 12.3.6 enhances the conversion from PDF to PDF/A-1a
We're pleased to announce the release of Spire.PDF for Java 12.3.6. This version fixes several issues encountered during PDF to PDF/A-1a conversion and PDF document loading. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPDF-7682 | Fixed an issue where images placed at the bottom layer appeared above text after converting PDF to PDF/A-1a. |
| Bug Fix | SPIREPDF-7944 | Fixed an issue where the application hung when loading a PDF document. |
| Bug Fix | SPIREPDF-7978 | Fixed an issue where partial text was lost after converting PDF to PDF/A-1a. |
| Bug Fix | SPIREPDF-7979 SPIREPDF-7993 | Fixed an issue where the application threw a "file structure is not valid" exception when loading a PDF document. |
Spire.Presentation 11.3.1 optimized the conversion from PowerPoint to PDF
We're pleased to announce the release of Spire.Presentation 11.3.1. This version optimized the conversion functionality from PowerPoint to PDF. Meanwhile, some issues that occurred when retrieving shape shadows, loading 3D animations, and converting documents have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPPT-2728 | Fixes the issue where shape shadow effects could not be retrieved. |
| Bug Fix | SPIREPPT-3072 | Fixes the issue where text offset occurred when converting PowerPoint to PDF. |
| Bug Fix | SPIREPPT-3081 | Fixes the issue where the application threw a "Property not found" exception when loading a PowerPoint containing 3D animations. |
| Bug Fix | SPIREPPT-3085 | Fixes the issue where the application threw an "Object reference not set to an instance of an object" exception when converting PowerPoint to PDF. |
Spire.Doc 14.3.5 supports converting Word to Excel
We’re pleased to announce the release of Spire.Doc for .NET 14.3.5. This release supports Word-to-Excel conversion, enabling direct export of Word content into Excel spreadsheets. In addition, export-related classes have been reorganized under a clearer namespace structure for improved API clarity. More details are as follows.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | - | Added support for Word to Excel conversion.
Document.SaveToFile("output.xlsx", FileFormat.XLSX);
|
| Adjustment | - | Moved HtmlExportOptions from Spire.Doc to Spire.Doc.Exporting. |
| Adjustment | - | Moved MarkdownExportOptions from Spire.Doc to Spire.Doc.Exporting. |
Spire.PDF 12.3.7 Enhances PDF to Word and Image Conversion
We’re pleased to announce the release of Spire.PDF 12.3.7. This version enhances PDF to Word and image conversion. It also fixes multiple issues, including a problem where merging PDFs threw System.OutOfMemoryException and an issue where content formatting was incorrect when converting PDF to Word. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPDF-5696 SPIREPDF-6453 | Fixed an issue where merging PDFs threw a System.OutOfMemoryException. |
| Bug Fix | SPIREPDF-7070 | Fixed an issue where merged PDF documents could not be opened in web browsers. |
| Bug Fix | SPIREPDF-7938 | Fixed an issue where checkmark symbols in checkboxes were missing after converting PDF to PDF/A-1a and other standard formats. |
| Bug Fix | SPIREPDF-7957 | Fixed an issue where content formatting was incorrect when converting PDF to Word. |
| Bug Fix | SPIREPDF-7965 | Fixed an issue where converting PDF to images threw a System.NullReferenceException. |
| Bug Fix | SPIREPDF-7966 | Fixed an issue where loading PDF threw an "An item with the same key has already been added" exception. |
| Bug Fix | SPIREPDF-7969 | Fixed an issue where finding text within a specified area returned incorrect results. |
Spire.Doc 14.3 supports adding and manipulating SmartArt
We're pleased to announce the release of Spire.Doc 14.3. This update introduces support for the “Automatically adjust right indent when defining grid” and "Kerning for fonts" features, along with several new interfaces for adding and manipulating SmartArt graphics. Additionally, three issues affecting Word document processing have been resolved. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREDOC-9870 | Added support for the "Automatically adjust right indent when defining grid" feature.
paragraph.Format.AdjustRightIndent = true; // Default value is true |
| New Feature | SPIREDOC-11030 | Added support for the "Kerning for fonts" feature.
textRange.CharacterFormat.Kerning = 2.5f; |
| New Feature | SPIREDOC-10514 SPIREDOC-11494 | Added several new interfaces for adding and manipulating SmartArt graphics.
Document document = new Document();
Section section = document.AddSection();
Spire.Doc.Documents.Paragraph paragraph = section.AddParagraph(); paragraph.Format.HorizontalAlignment = HorizontalAlignment.Center;
Spire.Doc.Fields.TextRange textRange = paragraph.AppendText("RepeatingBendingProcess");
textRange.CharacterFormat.FontSize = 28f;
textRange.CharacterFormat.FontName = "Times New Roman";
paragraph = section.AddParagraph();
paragraph = section.AddParagraph();
paragraph.Format.HorizontalAlignment = HorizontalAlignment.Center;
// Add SmartArt with "Segmented Process" layout
Spire.Doc.Fields.Shapes.Shape shape = paragraph.AppendSmartArt(SmartArtType.RepeatingBendingProcess, 432, 252);
SmartArt repeatingBendingSmartArt = shape.SmartArt;
// Add node text
SmartArtNode process1 = repeatingBendingSmartArt.Nodes[0];
process1.Text = "1";
((Spire.Doc.Fields.TextRange)process1.Paragraphs[0].ChildObjects[0]).CharacterFormat.FontName = "Calibri";
((Spire.Doc.Fields.TextRange)process1.Paragraphs[0].ChildObjects[0]).CharacterFormat.FontSize = 20f;
((Spire.Doc.Fields.TextRange)process1.Paragraphs[0].ChildObjects[0]).CharacterFormat.TextColor = Color.Crimson;
// Add node text
SmartArtNode process2 = repeatingBendingSmartArt.Nodes[1];
process2.Text = "2";
((Spire.Doc.Fields.TextRange)process2.Paragraphs[0].ChildObjects[0]).CharacterFormat.FontSize = 15f;
// Add node text
SmartArtNode process3 = repeatingBendingSmartArt.Nodes[2];
process3.Text = "3";
((Spire.Doc.Fields.TextRange)process3.Paragraphs[0].ChildObjects[0]).CharacterFormat.FontSize = 10f;
// Add node text
SmartArtNode process4 = repeatingBendingSmartArt.Nodes[3];
process4.Text = "4";
((Spire.Doc.Fields.TextRange)process4.Paragraphs[0].ChildObjects[0]).CharacterFormat.FontSize = 10f;
// Add node text
SmartArtNode process5 = repeatingBendingSmartArt.Nodes[4];
process5.Text = "5";
((Spire.Doc.Fields.TextRange)process5.Paragraphs[0].ChildObjects[0]).CharacterFormat.FontSize = 10f;
document.SaveToFile(outputFile, FileFormat.Docx);
document.Close();
|
| New Feature | SPIREDOC-11622 | Added support for retrieving text from all nodes in SmartArt.
using (Document document = new Document(inputFile))
{
// Iterate through all sections
foreach (Section section in document.Sections)
{
if (section?.Paragraphs == null) continue;
// Iterate through all paragraphs in the section
foreach (Spire.Doc.Documents.Paragraph paragraph in section.Paragraphs)
{
foreach (var childObj in paragraph.ChildObjects)
{
if (childObj is Spire.Doc.Fields.Shapes.Shape shape && shape.HasSmartArt)
{
SmartArt smartArt = shape.SmartArt;
if (smartArt == null) continue;
TraverseSmartArtNodes(smartArt.Nodes, builder, 0);
}
}
}
}
}
public static void TraverseSmartArtNodes(SmartArtNodeCollection nodes, StringBuilder builder, int level)
{
if (nodes == null || nodes.Count == 0) return;
for (int nodeIdx = 0; nodeIdx < nodes.Count; nodeIdx++)
{
SmartArtNode node = nodes[nodeIdx];
if (node == null) continue;
// Clean node text
string nodeText = node.Text != null ? node.Text.Trim() : "Empty Text";
if (nodeText == "\r" || string.IsNullOrEmpty(nodeText)) continue;
// Concatenate node level identifier
string nodePrefix;
switch (level)
{
case 0:
nodePrefix = "smartArt.Nodes";
break;
case 1:
nodePrefix = "smartArt.Nodes.ChildNodes";
break;
case 2:
nodePrefix = "smartArt.Nodes.ChildNodes.ChildNodes";
break;
default:
nodePrefix = $"smartArt.Nodes.Level{level}";
break;
}
// Basic text output
builder.AppendLine($"{nodePrefix}_{nodeIdx}: {nodeText}");
// Recursively process child nodes
TraverseSmartArtNodes(node.ChildNodes, builder, level + 1);
}
}
|
| Bug Fix | SPIREDOC-11724 | Fixed the issue where paragraph text was retrieved incorrectly. |
| Bug Fix | SPIREDOC-11743 | Fixed the issue where Arabic text fonts were altered when converting Word to PDF. |
| Bug Fix | SPIREDOC-11787 | Fixed the issue where extra blank pages appeared during page extraction. |
Spire.PDF for Java 12.3.2 Adds Support for Setting PDF 2.0 Version
We’re pleased to announce the release of Spire.PDF for Java 12.3.2. This version adds support for setting the PDF 2.0 version. It also fixes several issues, including a problem where punctuation marks appeared at the beginning of lines when rendering Chinese text. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREPDF-4796 | Added support for setting the PDF 2.0 version.
doc.getFileInfo().setVersion(PdfVersion.Version_2_0); |
| Bug Fix | SPIREPDF-6872 | Fixed an issue where punctuation marks appeared at the beginning of lines when rendering Chinese text. |
| Bug Fix | SPIREPDF-7863 | Fixed an issue where OFD files converted from PDF failed to open with ofd.umd.js. |
Spire.PDFViewer 8.2.13 supports .NET 6.0 WPF and WinForms applications
We're pleased to announce the release of Spire.PDFViewer 8.2.13. This version adds support for .NET 6.0 WPF and WinForms applications. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | - | Added support for .NET 6.0 WPF and WinForms applications. |
Spire.Doc for Java 14.3.1 supports the “Kerning for fonts” feature
We're pleased to announce the release of Spire.Doc for Java 14.3.1. This version supports the "Automatically adjust right indent when defining grid" and “Kerning for fonts” features. Additionally, several issues that occurred when converting Word to PDF/Markdown and loading files have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREDOC-9870 | Support the "Automatically adjust right indent when defining grid" feature.
paragraph.Format.AdjustRightIndent = true; // Default value is true |
| New Feature | SPIREDOC-11030 | Support the "Kerning for fonts" feature.
textRange.CharacterFormat.Kerning = 2.5f; |
| Bug Fix | SPIREDOC-11702 | Fixed an issue where loading a document threw the exception "Document element did not appear. Line 2, position 1". |
| Bug Fix | SPIREDOC-11742 | Fixed an issue where bullet/numbering positions in headings were incorrect when converting Word to Markdown. |
| Bug Fix | SPIREDOC-11798 | Fixed an issue where page layout effects were rendered incorrectly. |
| Bug Fix | SPIREDOC-11804 | Fixed an issue where extra blank pages appeared when converting Word to PDF. |
Spire.Office 11.2.0 is released
We’re pleased to announce the release of Spire.Office 11.2.0. In this version, Spire.Doc supports hiding rows in a table; Spire.XLS supports LET and MAP functions; Spire.PDF supports configuring text color when replacing text in PDF pages; Spire.Presentation enhances the conversion from PowerPoint to PDF. Meanwhile, a large number of known bugs has been fixed.
In this version, the most recent versions of Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Barcode, Spire.DocViewer, Spire.PDFViewer, Spire.Email, Spire.Spreadsheet, and Spire.OfficeViewer are included.
DLL Versions:
- Spire.Doc.dll v14.2.7
- Spire.Pdf.dll v12.2.14
- Spire.XLS.dll v16.2.4
- Spire.Presentation.dll v11.2.1
- Spire.Barcode.dll v7.5.0
- Spire.Email.dll v6.8.0
- Spire.DocViewer.Forms.dll v8.9.5
- Spire.PdfViewer.Asp.dll v8.2.9
- Spire.PdfViewer.Forms.dll v8.2.9
- Spire.Spreadsheet.dll v7.5.3
- Spire.OfficeViewer.Forms.dll v8.8.1
Here is a list of changes made in this release
Spre.doc
| Category | ID | Description |
| New feature | SPIREDOC-11444 | Added support for hiding rows in tables.
Spire.Doc.Document doc = new Spire.Doc.Document();
doc.LoadFromFile(inputFile1);TableRow row = doc.FirstSection.Body.Tables[0].FirstRow;
row.Hidden = true;doc.SaveToFile(outputDocxFile1);doc = new Document(outputDocxFile1);
row = doc.FirstSection.Body.Tables[0].FirstRow;
Assert.True(row.Hidden);
foreach (TableCell cell in row.Cells)
{
foreach (Paragraph para in cell.Paragraphs)
{
foreach (ParagraphBase run in para.ChildObjects)
{
if (run is TextRange || run is Break || run is Symbol)
{
Assert.True(run.CharacterFormat.Hidden);
}
}
}
}
|
| Adjustment | - | Removed the interfaces and classes under the namespace “Spire.Doc.Interface”:
IDocumentSerializable, IXDLSAttributeReader, IXDLSAttributeWriter, IXDLSContentReader, IXDLSContentWriter, IXDLSFactory, IXDLSSerializableCollection |
| Adjustment | - | Removed the interfaces and classes under the namespace “Spire.Doc.Documents.XML”:
DocumentSerializable, DocumentSerializableCollection, XDLSHolder, XDLSReader |
| Adjustment | - | Removed the IShapeAttrSource interface. |
| Adjustment | - | Removed the following public methods from ShapeBase:
public object GetDirectShapeAttr(int key) public object FetchInheritedShapeAttr(int key) public object FetchShapeAttr(int key) public void SetShapeAttr(int key, object value) public void RemoveShapeAttr(int key) public object GetDirectShapeAttribute(int key) public object GetInheritedShapeAttribute(int key) public object GetShapeAttribute(int key) public void SetShapeAttribute(int key, object value) public void RemoveShapeAttribute(int key) public bool HasKey(int key) |
| Bug Fix | SPIREDOC-11799 | Fixed the issue where converting Word to PDF results inconsistent output. |
Spre.XLS
| Category | ID | Description |
| New Feature | SPIREXLS-6086 SPIREXLS-6087 | Added support for the LET and MAP functions.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];
sheet.Range["C1"].Text = "out";
sheet.Range["C2"].Formula = "=LET(x, 5, y, 10, x + y)";
sheet.Range["C3"].Formula = "=LET(a, 1, b, 2, c, 3, d, 4, a+b+c+d)";
sheet.Range["C4"].Formula = "=LET(outer, LET(inner, 5, inner*2), outer+10)";
sheet.Range["C5"].Formula = "=LET(x, 5, y, x*2, z, y+3, z*2)";
sheet.Range["C2"].Formula = "=MAP(A2:A4, LAMBDA(x, x*2))";
sheet.Range["D2"].Formula = "=MAP(A2:A4,LAMBDA(x,x*10+1))";
sheet.Range["A8"].Formula = "=MAP(A2:B4,C2:D4,LAMBDA(x,y,SUM(x,y)))";
|
| Bug Fix | SPIREXLS-6061 | Fixed an issue where comments were not sorted when using DataSorter.Sort(). |
| Bug Fix | SPIREXLS-6078 | Fixed an issue where ConditionalFormats.Remove() did not work correctly. |
| Bug Fix | SPIREXLS-6082 | Fixed an issue where column widths became inconsistent when opening the saved Excel file in WPS. |
| Bug Fix | SPIREXLS-6084 | Fixed an issue where images were lost when converting Office 365 Excel documents to PDF. |
| Bug Fix | SPIREXLS-6090 | Fixed an issue where setting the font size for merged cells did not take effect. |
| Bug Fix | SPIREXLS-6099 SPIREXLS-6100 | Fixed an issue where Excel-to-PDF conversion results were inconsistent. |
Spire.Presentation
| Category | ID | Description |
| Category | ID | Description |
| Bug Fix | SPIREPPT-2841 | Fixed the issue where rendering effects were inconsistent when converting PowerPoint to SVG. |
| Bug Fix | SPIREPPT-3073 | Fixed the issue that extraneous log information was generated when converting PowerPoint to PDF. |
| Bug Fix | SPIREPPT-3073 | Fixed the issue that charts were missing when converting PowerPoint to PDF. |
Spire.PDF
| Category | ID | Description |
| Optimization | SPIREPDF-7881 | Optimizes the compression functionality for netstandard DLLs to improve the file compression ratio. |
| New Feature | SPIREPDF-7780 | Added support for the PdfHatchStyle interface to create Hatch Brushes.
PdfDocument pdf = new PdfDocument();
foreach (PdfHatchStyle type in Enum.GetValues(typeof(PdfHatchStyle)))
{
PdfPageBase page = pdf.Pages.Add();
PdfCanvas canves = page.Canvas;
Color foreColor = Color.FromArgb(255, 255, 255, 0);
Color backColor = Color.FromArgb(255, 78, 167, 46);
page.Canvas.DrawString(type.ToString(), new PdfTrueTypeFont(new System.Drawing.Font("Arial", 16)), new PdfSolidBrush(Color.Black), new PointF(0, 0), true);
PdfHatchBrush brush = new PdfHatchBrush(type, foreColor, backColor);
canves.DrawRectangle(brush, 100, 100, 300, 200);
}
pdf.SaveToFile(output);
pdf.Dispose();
|
| New Feature | SPIREPDF-7907 | Added support for configuring text color when replacing text in PDF pages.
PdfTextReplacer textReplacer = new PdfTextReplacer(page);
textReplacer.Options = textReplaceOptions;
textReplacer.ReplaceAllText("文档", "文件", Color.Red);
|
| Bug Fix | SPIREPDF-7871 | Fixed the issue where the program hung when converting PDF to images. |
| Bug Fix | SPIREPDF-7882 | Fixed the issue where the seal was rendered incorrectly when converting OFD to images. |
| Bug Fix | SPIREPDF-7915 | Fixed the issue where the output was incorrect when converting XPS to PDF. |
| Bug Fix | SPIREPDF-7922 | Fixed the issue that PDF bookmark destinations were altered. |
| Bug Fix | SPIREPDF-7943 | Fixed the issue where added bookmarks appeared in incorrect positions. |
| Bug Fix | SPIREPDF-7945 | Fixed the issue where an "Invalid font metrics" exception was thrown when converting PDF to PDF/A-2B. |
| Bug Fix | SPIREPDF-7946 | Fixed the issue where an “InvalidOperationException” was thrown when converting PDF to PDF/A-2B. |
| Bug Fix | SPIREPDF-7949 | Fixed the issue where an "Object reference not set to an instance of an object" exception was thrown when converting OFD to PDF. |
| Bug Fix | SPIREPDF-7853 | Fixes an issue where converting PDF to images resulted in incorrect rendering. |
| Bug Fix | SPIREPDF-7920 | Fixes an issue where shadows were offset when converting PDF to images. |
| Bug Fix | SPIREPDF-7952 | Fixes an issue where adding images to a PDF resulted in slow execution and excessively large file sizes. |
| Bug Fix | SPIREPDF-7953 | Fixes a NullReferenceException thrown when drawing the "MS Gothic" font onto a page. |
Spire.PDF 12.2.14 supports creating Hatch Brushes with the PdfHatchStyle interface
We're pleased to announce the release of Spire.PDF 12.2.14. This version supports creating Hatch Brushes using the PdfHatchStyle interface and configuring text color when replacing text in PDF pages. Meanwhile, the compression functionality for netstandard DLLs has been optimized, and some issues that occurred when converting PDF to images, adding images, or drawing fonts have also been successfully fixed. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Optimization | SPIREPDF-7881 | Optimizes the compression functionality for netstandard DLLs to improve the file compression ratio. |
| New Feature | SPIREPDF-7780 | Added support for the PdfHatchStyle interface to create Hatch Brushes.
PdfDocument pdf = new PdfDocument();
foreach (PdfHatchStyle type in Enum.GetValues(typeof(PdfHatchStyle)))
{
PdfPageBase page = pdf.Pages.Add();
PdfCanvas canves = page.Canvas;
Color foreColor = Color.FromArgb(255, 255, 255, 0);
Color backColor = Color.FromArgb(255, 78, 167, 46);
page.Canvas.DrawString(type.ToString(), new PdfTrueTypeFont(new System.Drawing.Font("Arial", 16)), new PdfSolidBrush(Color.Black), new PointF(0, 0), true);
PdfHatchBrush brush = new PdfHatchBrush(type, foreColor, backColor);
canves.DrawRectangle(brush, 100, 100, 300, 200);
}
pdf.SaveToFile(output);
pdf.Dispose();
|
| New Feature | SPIREPDF-7907 | Added support for configuring text color when replacing text in PDF pages.
PdfTextReplacer textReplacer = new PdfTextReplacer(page);
textReplacer.Options = textReplaceOptions;
textReplacer.ReplaceAllText("文档", "文件", Color.Red);
|
| Bug Fix | SPIREPDF-7853 | Fixes an issue where converting PDF to images resulted in incorrect rendering. |
| Bug Fix | SPIREPDF-7920 | Fixes an issue where shadows were offset when converting PDF to images. |
| Bug Fix | SPIREPDF-7952 | Fixes an issue where adding images to a PDF resulted in slow execution and excessively large file sizes. |
| Bug Fix | SPIREPDF-7953 | Fixes a NullReferenceException thrown when drawing the "MS Gothic" font onto a page. |