Spire.PDF for Java 12.8.6 enhances the conversion from PDF to Word
We're pleased to announce the release of Spire.PDF for Java 12.8.6. This version mainly enhances the conversion from PDF to Word. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | - | Optimized PDF to Word conversion effects. |
Spire.PDF 12.8.3 fixes PDF conversion and text extraction issues
We’re pleased to announce the release of Spire.PDF 12.8.3. This version fixes several issues, including an exception that occurred when converting PDF files to images and overlapping characters when extracting text from PDF files. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPDF-8114 | Fixed an issue where the program threw a “System.InvalidOperationException: can not convert to rectangle” error when converting PDF to images. |
| Bug Fix | SPIREPDF-8131 | Fixed an issue where characters overlapped when extracting text from PDF files. |
Spire.Presentation 11.8.2 enhances the conversion from PPTX to PDF
We’re pleased to announce the release of Spire.Presentation for .NET 11.8.2. This update mainly fixes the issues that occurred when convert PPTX to PDF and SVG. More details are as follows.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPPT-3090 SPIREPPT-3115 | Fixed the issue where the content was inconsistent when converting PPTX to PDF. |
| Bug Fix | SPIREPPT-3146 | Fixed the issue where text content was rendered as <path> tags when converting PPTX to SVG. |
| Bug Fix | SPIREPPT-3158 | Fixed the issue where the content was incorrect when exporting shapes to SVG in PPTX. |
Spire.PDF for Android via Java 10.8.5 adds SHA-256/SHA-512 certificate signing support
We're pleased to announce the release of Spire.PDF for Android via Java 10.8.5. This version adds support for signing PDF documents with certificates using SHA-256/SHA-512 algorithms. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | - | Added support for signing with SHA-256/SHA-512 algorithm certificates.
public static void main(String[] args) throws IOException {
// Create pdf document PdfDocument doc = new PdfDocument();
// Load file from disk doc.loadFromFile("Sample.pdf");
// Load the X509 certificate for signature PdfPKCS7Formatter formatter = new PdfPKCS7Formatter(new PdfCertificate("gary.pfx", "e-iceblue"), false);
// Create an instance of PdfOrdinarySignatureMaker using the loaded document and certificate PdfOrdinarySignatureMaker signatureMaker = new PdfOrdinarySignatureMaker(doc, formatter);
// Create an instance of PdfCustomSignatureAppearance as the appearance for the signature IPdfSignatureAppearance signatureAppearance = new PdfCustomSignatureAppearance();
// Make the signature with a specified name and the custom appearance signatureMaker.makeSignature("Signature", signatureAppearance);
// Iterate through all hash algorithm types for (HashAlgorithmType hashAlg : HashAlgorithmType.values()) {
// Skip SM3 (case-insensitive) if ("SM3".equalsIgnoreCase(hashAlg.name())) {
continue;
}
try {
// Set the current hash algorithm formatter.getProperties().setHashAlgorithm(hashAlg);
String filePath = "AddImageSignature_" + hashAlg.name() + ".pdf";
doc.saveToFile(filePath, FileFormat.PDF);
System.out.println("Succeed:" + hashAlg.name());
} catch (Exception ex) {
System.out.println("Error HashAlgorithmType:" + hashAlg.name());
System.out.println("Error Info:" + ex.getMessage());
}
}
// Close the document doc.close();
}
// Custom signature appearance implementation public static class PdfCustomSignatureAppearance implements IPdfSignatureAppearance {
@Override
public void generate(PdfCanvas pdfCanvas) {
// Set font size int fontSize = 10;
// Create Arial font PdfTrueTypeFont font = new PdfTrueTypeFont(new Font("Arial", Font.PLAIN, fontSize), true);
// Set line height float lineHeight = fontSize;
// Draw text string pdfCanvas.drawString("AAAAAAAAAAA", font, PdfBrushes.getRed(), new Point.Float(0, 0));
// Draw image at specified position pdfCanvas.drawImage(PdfImage.fromFile("E-iceblue logo.png"), new Point.Float(20, 0));
}
}
|
Spire.Barcode 7.5.4 synchronizes BarcodeSettings enumeration settings on the NETStandard platform
We are happy to announce the release of Spire.Barcode 7.5.4. This version synchronizes BarcodeSettings enumeration settings on the netstandard platform, and also improves barcode recognition accuracy. Details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREBARCODE-280 | Added support for synchronizing BarcodeSettings enumeration settings on the NETStandard platform.
setting.BorderDashStyle = Spire.Barcode.Publics.Drawing.DashStyle.DashDotDot; Spire.Barcode.Publics.Drawing.StringAlignment.Center; |
| Bug Fix | SPIREBARCODE-290 | Improved and optimized barcode recognition accuracy. |
Spire.PDF 12.8.0 fixes the issue where adding attachments failed
We're pleased to announce the release of Spire.PDF 12.8.0. This version successfully fixes the issues where adding attachments failed, PdfGrayConverter.ToGrayPdf() produced incorrect effects, and extracting images produced incorrect results. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREPDF-7681 | Fixes the issue where adding attachments failed. |
| Bug Fix | SPIREPDF-8080 | Fixes the issue where PdfGrayConverter.ToGrayPdf() produced incorrect effects. |
| Bug Fix | SPIREPDF-8122 | Fixes the issue where extracting images produced incorrect results. |
Spire.Doc 14.8.0 Improves Word to PDF Conversion
We’re pleased to announce the release of Spire.Doc 14.8.0. This version improves Word to PDF conversion and resolves a “NullReferenceException” that occurred when retrieving the layout elements of a paragraph. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| Bug Fix | SPIREDOC-11385 | Fixed an issue where a “NullReferenceException” was thrown when retrieving the layout elements of a paragraph. |
| Bug Fix | SPIREDOC-11848 | Fixed an issue where the document layout was rendered incorrectly when converting Word documents to PDF. |
| Bug Fix | SPIREDOC-11981 | Fixed an issue where an “ArgumentOutOfRangeException” was thrown when converting Word documents to PDF. |
Spire.Office for Java 11.7.0 is released
We are happy to announce the release of Spire.Office for Java 11.7.0. In this version, Spire.Doc for Java supports SVG image detection with isSVG property; Spire.XLS for Java supports converting a specified cell range to HTML; Spire. Presentation for Java supports converting PowerPoint to pure HTML format; Spire.PDF for Java improves stability and fixes multiple issues. Besides, many issues have been successfully fixed in this version. More details are listed below.
Here is a list of changes made in this release
Spire.Doc for Java
| Category | ID | Description |
| New Feature | SPIREDOC-8865 SPIREDOC-11824 SPIREDOC-10144 | Added setIgnoreFields and setIgnoreCaseChanges configuration options to the CompareOptions class. Renamed setIgnoreTable(boolean value) to setIgnoreTables(boolean value). Renamed the corresponding getter getIgnoreTable() to getIgnoreTables().
Document doc1 = ConvertUtil.GetNewEngineDocument();
doc1.loadFromFile(inputFile_1);
String[] name1 = new String[]{"DJG_Black_Book", "DJG_Repairs_Expense", "DJG_Sale_Amount", "DJG_Dealer_Payment", "DJG_Auction_Fees"};
String[] value1 = new String[]{"20,000.00", "2,000.00", "13,500.00", "1,000.00", "500.00"};
doc1.getMailMerge().execute(name1, value1);
doc1.isUpdateFields(true);
Document doc2 = ConvertUtil.GetNewEngineDocument();
doc2.loadFromFile(inputFile_2);
String[] name2 = new String[]{"DJG_Black_Book", "DJG_Repairs_Expense", "DJG_Sale_Amount", "DJG_Dealer_Payment", "DJG_Auction_Fees"};
String[] value2 = new String[]{"50,000.00", "5,000.00", "3,500.00", "1,000.00", "200.00"};
doc2.getMailMerge().execute(name2, value2);
doc2.isUpdateFields(true);
CompareOptions options = new CompareOptions();
//set 'Moves'
options.setCompareMoves(true);
//set 'Case Changes'
options.setIgnoreCaseChanges(true);
//set 'Comments'
options.setIgnoreComments(true);
//set 'Fields'
options.setIgnoreFields(true);
//set 'Footnotes'
options.setIgnoreFootnotes(true);
//set 'Tables'
options.setIgnoreTables(true);
//set 'Textboxes'
options.setIgnoreTextboxes(true);
doc1.compare(doc2, "user", new Date(), options);
doc1.saveToFile(outputFile, FileFormat.Docx_2013);
doc1.close();
doc2.close();
|
| New Feature | SPIREDOC-11975 | Added support for the "Two Lines in One" feature.
Document doc = ConvertUtil.GetNewEngineDocument();
Section section = doc.addSection();
section.setTextDirection(TextDirection.Right_To_Left);
Paragraph titlePara = section.addParagraph();
titlePara.appendText("===== FarEastLayout Two-Lines-in-One Full Scenario Test =====\n\n");
titlePara.appendText("\n\n1. Basic Two-Lines-in-One: ");
// Basic Two-Lines-in-One Combine=true, no brackets, no vertical layout
Paragraph p1 = section.addParagraph();
TextRange farEastLayout = p1.appendText("Basic Two-Lines-in-One: One Two Three Four");
farEastLayout.getCharacterFormat().setFontSize(12);
farEastLayout.getCharacterFormat().setFontNameFarEast("Songti");
FarEastLayout layout1 = new FarEastLayout();
layout1.setCombine(true); // Two-Lines-in-One
farEastLayout.getCharacterFormat().setFarEastLayout(layout1);
// Two-Lines-in-One + various bracket styles
Paragraph p1Title = section.addParagraph();
p1Title.appendText("\n\n2. Two-Lines-in-One + Different Brackets: ");
for (CombineBrackets bracket : CombineBrackets.values()) {
Paragraph pTmp = section.addParagraph();
TextRange rt = pTmp.appendText("Bracket Type " + bracket.name() + ": A B C D");
rt.getCharacterFormat().setFontSize(12);
rt.getCharacterFormat().setFontNameFarEast("Songti");
FarEastLayout layoutTmp = new FarEastLayout();
layoutTmp.setCombine(true);
layoutTmp.setCombineBrackets(bracket);
rt.getCharacterFormat().setFarEastLayout(layoutTmp);
}
doc.saveToFile(outputFile, FileFormat.Docx);
doc.close();
|
| New Feature | SPIREDOC-12004 | Added isSVG property support to check if a picture is an SVG.
DocPicture picture = (DocPicture) object;if (picture.isSVG()) {
byte[] svgBytes = picture.getImageBytes();
Files.write(Paths.get(outputFile), svgBytes);
}
|
| Bug Fix | SPIREDOC-11155 | Fixed the issue where a StringIndexOutOfBoundsException occurred when comparing documents. |
| Bug Fix | SPIREDOC-11816 | Fixed the issue where table formatting became disordered after accepting revisions. |
| Bug Fix | SPIREDOC-11918 SPIREDOC-11926 SPIREDOC-11960 SPIREDOC-11964 SPIREDOC-11968 | Fixed the issue where content layout was inconsistent when converting Word to PDF. |
| Bug Fix | SPIREDOC-11919 | Fixed the issue where the display effect was incorrect when opening merged Word documents in WPS. |
| Bug Fix | SPIREDOC-11956 | Fixed the issue where table layout was incorrect when converting Word to HTML. |
| Bug Fix | SPIREDOC-11962 | Fixed the issue where images rendered incorrectly when converting Word to PDF in Ubuntu environments. |
| Bug Fix | SPIREDOC-11966 | Fixed the issue where font effects were incorrect when converting Word to PDF. |
| Bug Fix | SPIREDOC-11973 | Fixed the issue where packaging errors occurred in higher-version Java environments. |
| Bug Fix | SPIREDOC-11975 | Added compatibility for "Double-line Combination" effect when converting Word to PDF. |
| Bug Fix | SPIREDOC-11857 | Fixed the issue where saving a Word document took too long. |
| Bug Fix | SPIREDOC-11893 | Fixed the issue where a NullPointerException was thrown when comparing Word documents. |
| Bug Fix | SPIREDOC-11958 | Fixed the issue where content overlapped when converting Word to PDF. |
| Bug Fix | SPIREDOC-11961 | Fixed the issue where image text appeared garbled when converting Word to PDF. |
| Bug Fix | SPIREDOC-11979 | Fixed the issue where the layout was incorrect when converting Word to PDF. |
| Bug Fix | SPIREDOC-11981 | Fixed the issue where an ArgumentOutOfRangeException was thrown when converting Word to PDF. |
| Bug Fix | SPIREDOC-11983 | Fixed the issue where styles were not fully copied from a template to another document. |
| Bug Fix | SPIREDOC-11989 | Fixed the issue where a "Document element did not appear. Line 1, position 1" exception was thrown when loading a Word document. |
| Bug Fix | SPIREDOC-11993 | Fixed the issue where extra blank pages were added when cloning a document. |
| Bug Fix | SPIREDOC-11994 | Fixed the issue where a "String index out of range: 76" exception was thrown when comparing Word documents. |
| Bug Fix | SPIREDOC-11996 | Fixed the issue where the table format was incorrect when cloning sections. |
| Bug Fix | SPIREDOC-12005 | Fixed the issue where the rendering effect was incorrect when converting Word to PDF. |
Spire.XLS for Java
| Category | ID | Description |
| New Feature | SPIREXLS-5934 | Adds a new property to control whether to retain frozen rows and columns when converting Excel to HTML, with the default value set to false.
Workbook wb = new Workbook(); wb.loadFromFile(inputFile); HTMLOptions.Default.isSaveFreezedPanes(true); wb.saveToFile(outputFile, FileFormat.HTML); wb.dispose(); |
| New Feature | SPIREXLS-5938 | Adds the isSavePicInRelativePath property to control whether images are saved using relative paths when converting Excel to Markdown.
Workbook wb = new Workbook();
wb.loadFromFile(inputFile);
MarkdownOptions markdownOptions = new MarkdownOptions();
markdownOptions.isSavePicInRelativePath(true);
wb.saveToMarkdown(outputFile, markdownOptions);
wb.dispose();
|
| New Feature | SPIREXLS-5948 | Adds support for the BYROW and BYCOL functions.
sheet.getRange().get("G7").setFormula("=BYROW(B7:F7, LAMBDA(row, AVERAGE(row)))");
sheet.getRange().get("B8").setFormula("=BYCOL(B2:B7, LAMBDA(col, AVERAGE(col)))");
|
| New Feature | SPIREXLS-5975 | Adds the isSaveHyperlinkAsRef property to control whether to save hyperlinks as Markdown reference-style links when converting Excel to Markdown.
Workbook wb = new Workbook(); wb.loadFromFile(inputFile); MarkdownOptions markdownOptions = new MarkdownOptions(); markdownOptions.isSaveHyperlinkAsRef(true); wb.saveToMarkdown(outputFile, markdownOptions); wb.dispose(); |
| New Feature | SPIREXLS-5980 | Supports converting a specified cell range to HTML.
StringBuilder sb = new StringBuilder();
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
Worksheet sheet = workbook.getWorksheets().get(0);
CellRange cell = sheet.getRange().get("A1:B3");
sb.append(cell.getHtmlString());
|
| New Feature | SPIREXLS-5982 | Adds support for the XMATCH function.
sheet.getRange().get("C4").setFormula("=XMATCH(\"Lucy\", A2:A5)");
|
| New Feature | SPIREXLS-5983 | Adds support for swapping rows and columns.
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
Worksheet sheet = workbook.getWorksheets().get(0);
EnumSet<CopyRangeOptions> options = EnumSet.of(CopyRangeOptions.Transpose, CopyRangeOptions.All);
sheet.getRange().get("D1").setText("Transpose A1:C4 to D2:G3:");
sheet.getRange().get("A1:C4").copy(sheet.getRange().get("D2:G3"), options);
sheet.getRange().get("D4").setText("Transpose A1:B5 to D5:");
sheet.getRange().get("A1:B5").copy(sheet.getRange().get("D5"), options);
options = EnumSet.of(CopyRangeOptions.Transpose, CopyRangeOptions.CopyStyles);
sheet.getRange().get("D9").setText("Transpose A10 to D10:");
sheet.getRange().get("A10").copy(sheet.getRange().get("D10"), options);
sheet.getRange().get("D11").setText("Transpose A11:B11 to D12:");
sheet.getRange().get("A11:B11").copy(sheet.getRange().get("D12"), options);
options = EnumSet.of(CopyRangeOptions.Transpose, CopyRangeOptions.CopyConditionalFormats);
sheet.getRange().get("D16").setText("Transpose B17:B20 to D17:");
sheet.getRange().get("B17:B20").copy(sheet.getRange().get("D17"), options);
options = EnumSet.of(CopyRangeOptions.Transpose, CopyRangeOptions.CopyStyles);
sheet.getRange().get("D19").setText("Transpose B17:B20 to D20:");
sheet.getRange().get("B17:B20").copy(sheet.getRange().get("D20"), options);
options = EnumSet.of(CopyRangeOptions.Transpose);
sheet.getRange().get("D22").setText("Transpose B17:B20 to D23:");
sheet.getRange().get("B17:B20").copy(sheet.getRange().get("D23"), options);
workbook.saveToFile(outputFile);
sheet.dispose();
workbook.dispose();
|
| New Feature | SPIREXLS-5990 | Adds support for embedding checkbox controls in cells and setting their checked states.
Workbook workbook = new Workbook();
Worksheet sheet = workbook.getWorksheets().get(0);
XlsRange range = (XlsRange)sheet.getRange().get("A1");
range.insertEmbedCheckBox();
range.setEmbedCheckBoxCheckState(true);
workbook.saveToFile(outputFile);
workbook.dispose();
|
| New Feature | SPIREXLS-6020 | Adds support for the Data Table (What-If Analysis) feature, covering creation, editing, deletion, summary generation, and consolidation.
Workbook wb = new Workbook();
wb.loadFromFile(inputFile);
Worksheet worksheet = wb.getWorksheets().get(0);
// Access the collection of scenarios in the worksheet
XlsScenarioCollection scenarios = worksheet.getScenarios();
//Initialize list objects with different values for scenarios
List currentChangePercentage_Values = new ArrayList() {{ add(0.23); add(0.8); add(1.1); add(0.5); add(0.35); add(0.2); }};
List increasedChangePercentage_Values = new ArrayList() {{ add(0.45); add(0.56); add(0.9); add(0.5); add(0.58); add(0.43); }};
List decreasedChangePercentage_Values = new ArrayList() {{ add(0.3); add(0.2); add(0.5); add(0.3); add(0.5); add(0.23); }};
List currentQuantity_Values = new ArrayList() {{ add(1500); add(3000); add(5000); add(4000); add(500); add(4000); }};
List increasedQuantity_Values = new ArrayList() {{ add(1000); add(5000); add(4500); add(3900); add(10000); add(8900); }};
List decreasedQuantity_Values = new ArrayList() {{ add(1000); add(2000); add(3000); add(3000); add(300); add(4000); }};
//Add scenarios in the worksheet with different values for the same cells
scenarios.add("Current % of Change", worksheet.getRange().get("F5:F10"), currentChangePercentage_Values);
scenarios.add("Increased % of Change", worksheet.getRange().get("F5:F10"), increasedChangePercentage_Values);
scenarios.add("Decreased % of Change", worksheet.getRange().get("F5:F10"), decreasedChangePercentage_Values);
scenarios.add("Current Quantity", worksheet.getRange().get("D5:D10"), currentQuantity_Values);
scenarios.add("Increased Quantity", worksheet.getRange().get("D5:D10"), increasedQuantity_Values);
scenarios.add("Decreased Quantity", worksheet.getRange().get("D5:D10"), decreasedQuantity_Values);
//Saving the workbook
wb.saveToFile(outputFile, ExcelVersion.Version2013);
wb.dispose();
Workbook wb = new Workbook();
wb.loadFromFile(inputFile);
Worksheet worksheet = wb.getWorksheets().get(0);
// Access the collection of scenarios in the worksheet
XlsScenarioCollection scenarios = worksheet.getScenarios();
XlsScenario scenario1 = scenarios.get(0);
XlsScenario scenario2 = scenarios.get(1);
//Modify the scenario
scenario1.setVariableCells(worksheet.getRange().get("A1:A5"), scenario2.getValues());
CellRange sourceCell = worksheet.getRange().get("B1:B5");
scenario2.setVariableCells(sourceCell, scenario2.getValues());
scenario1.show();
scenario2.show();
//Saving the workbook
wb.saveToFile(outputFile, ExcelVersion.Version2013);
wb.dispose();
Workbook wb = new Workbook();
wb.loadFromFile(inputFile);
Worksheet worksheet = wb.getWorksheets().get(0);
// Access the collection of scenarios in the worksheet
XlsScenarioCollection scenarios = worksheet.getScenarios();
//delete the scenario
scenarios.removeScenarioAt(0);// Delete by index
scenarios.removeScenarioByName("two");// Delete by name
String content = "";
content += "Count:" + scenarios.getCount() + "\n";
content += "ContainsScenario:" + scenarios.containsScenario("two") + "\n";
content += "ContainsScenario:" + scenarios.containsScenario("one") + "\n";
TestUtil.writeAllText(outputFile, content);
//Saving the workbook
wb.dispose();
Workbook wb = new Workbook();
wb.loadFromFile(inputFile);
Worksheet worksheet = wb.getWorksheets().get(0);
// Access the collection of scenarios in the worksheet
XlsScenarioCollection scenarios = worksheet.getScenarios();
//Initialize list objects with different values for scenarios
List currentChangePercentage_Values = new ArrayList() {{ add(0.23); add(0.8); add(1.1); add(0.5); add(0.35); add(0.2); }};
List increasedChangePercentage_Values = new ArrayList() {{ add(0.45); add(0.56); add(0.9); add(0.5); add(0.58); add(0.43); }};
List decreasedChangePercentage_Values = new ArrayList() {{ add(0.3); add(0.2); add(0.5); add(0.3); add(0.5); add(0.23); }};
List currentQuantity_Values = new ArrayList() {{ add(1500); add(3000); add(5000); add(4000); add(500); add(4000); }};
List increasedQuantity_Values = new ArrayList() {{ add(1000); add(5000); add(4500); add(3900); add(10000); add(8900); }};
List decreasedQuantity_Values = new ArrayList() {{ add(1000); add(2000); add(3000); add(3000); add(300); add(4000); }};
//Add scenarios in the worksheet with different values for the same cells
scenarios.add("Current % of Change", worksheet.getRange().get("F5:F10"), currentChangePercentage_Values);
scenarios.add("Increased % of Change", worksheet.getRange().get("F5:F10"), increasedChangePercentage_Values);
scenarios.add("Decreased % of Change", worksheet.getRange().get("F5:F10"), decreasedChangePercentage_Values);
scenarios.add("Current Quantity", worksheet.getRange().get("D5:D10"), currentQuantity_Values);
scenarios.add("Increased Quantity", worksheet.getRange().get("D5:D10"), increasedQuantity_Values);
scenarios.add("Decreased Quantity", worksheet.getRange().get("D5:D10"), decreasedQuantity_Values);
//Create Summary
worksheet.getScenarios().summary(worksheet.getRange().get("L7"));
//Saving the workbook
wb.saveToFile(outputFile, ExcelVersion.Version2013);
wb.dispose();
Workbook wb = new Workbook(); wb.loadFromFile(inputFile); Worksheet worksheet1 = wb.getWorksheets().get(0); Worksheet worksheet2 = wb.getWorksheets().get(1);// This sheet contains Scenarios //Merge the scenario worksheet1.getScenarios().merge(worksheet2); //Saving the workbook wb.saveToFile(outputFile, ExcelVersion.Version2013); wb.dispose(); |
| New Feature | SPIREXLS-6162 | Adds support for converting Excel to JSON data.
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
workbook.saveToFile(outputFile, FileFormat.Json);
workbook.dispose();
|
| Bug Fix | SPIREXLS-6160 | Fixes the issue where an "Invalid cell name" exception was thrown when loading an Excel document. |
| Bug Fix | SPIREXLS-6163 | Fixes the issue where extra vertical lines appeared on chart axes when copying a cell range. |
| Bug Fix | SPIREXLS-6166 | Fixes the issue where retrieving the print area of an Excel document failed. |
| Bug Fix | SPIREXLS-5940 | Fixes the issue where a "System.ArgumentOutOfRangeException" exception was thrown when copying a worksheet containing a Slicer. |
Spire.Presentation for Java
| 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. |
Spire.PDF for Java
| 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. |
Spire.Doc for Java 14.7.4 supports SVG image detection with isSVG property
We're pleased to announce the release of Spire.Doc for Java 14.7.4. This version adds the isSVG property to check whether a picture is an SVG image. It also fixes several issues related to Word document saving, comparison, cloning, and Word to PDF conversion. More details are listed below.
Here is a list of changes made in this release
| Category | ID | Description |
| New Feature | SPIREDOC-12004 | Added isSVG property support to check if a picture is an SVG.
DocPicture picture = (DocPicture) object;if (picture.isSVG()) {
byte[] svgBytes = picture.getImageBytes();
Files.write(Paths.get(outputFile), svgBytes);
}
|
| Bug Fix | SPIREDOC-11857 | Fixed the issue where saving a Word document took too long. |
| Bug Fix | SPIREDOC-11893 | Fixed the issue where a NullPointerException was thrown when comparing Word documents. |
| Bug Fix | SPIREDOC-11958 | Fixed the issue where content overlapped when converting Word to PDF. |
| Bug Fix | SPIREDOC-11961 | Fixed the issue where image text appeared garbled when converting Word to PDF. |
| Bug Fix | SPIREDOC-11979 | Fixed the issue where the layout was incorrect when converting Word to PDF. |
| Bug Fix | SPIREDOC-11981 | Fixed the issue where an ArgumentOutOfRangeException was thrown when converting Word to PDF. |
| Bug Fix | SPIREDOC-11983 | Fixed the issue where styles were not fully copied from a template to another document. |
| Bug Fix | SPIREDOC-11989 | Fixed the issue where a "Document element did not appear. Line 1, position 1" exception was thrown when loading a Word document. |
| Bug Fix | SPIREDOC-11993 | Fixed the issue where extra blank pages were added when cloning a document. |
| Bug Fix | SPIREDOC-11994 | Fixed the issue where a "String index out of range: 76" exception was thrown when comparing Word documents. |
| Bug Fix | SPIREDOC-11996 | Fixed the issue where the table format was incorrect when cloning sections. |
| Bug Fix | SPIREDOC-12005 | Fixed the issue where the rendering effect was incorrect when converting Word to PDF. |
Spire.Office 11.7.0 is released
We're pleased to announce the release of Spire.Office 11.7.0. This version adds several new features. For example, Spire.XLS adds a property to avoid exceptions triggered by long header/footer text; Spire.Presentation supports saving macro-enabled files and managing VBA modules. What’s more, a series of issues that occurred when processing Excel, PDF, and PowerPoint files have been successfully fixed. More details are given below.
In this version, the most recent versions of Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Email, Spire.DocViewer, Spire.PDFViewer, Spire.Spreadsheet, Spire.OfficeViewer, Spire.DataExport, Spire.Barcode are included.
DLL Versions:
- Spire.Doc.dll: 14.7.5
- Spire.Pdf.dll: 12.7.8
- Spire.XLS.dll: 16.7.2
- Spire.Presentation.dll: 11.7.6
- Spire.Barocde.dll: 7.5.0
- Spire.DocViewer.dll: 8.9.5
- Spire.Email.dll: 6.8.0
- Spire.OfficeViewer.dll: 8.8.1
- Spire.PdfViewer.Asp.dll: 8.3.0
- Spire.PdfViewer.Forms.dll: 8.3.0
- Spire.Spreadsheet.dll: 7.5.3
Here is a list of changes made in this release
Spre.XLS
| Category | ID | Description |
| New Feature | SPIREXLS-6161 | Added the new ValidateHeaderFooterLength property to prevent the exception triggered by long header or footer text when converting Excel to PDF.
workbook.ConverterSetting.ValidateHeaderFooterLength = false; |
| Bug Fix | - | Fixed the issue where applying multiple licenses failed to take effect. |
| Bug Fix | SPIREXLS-6152 | Fixed the issue where setting the NumberFormat of a cell failed to take effect. |
| Bug Fix | SPIREXLS-6157 | Fixed the issue where images were misaligned when converting Excel to PDF. |
| Bug Fix | SPIREXLS-6158 | Fixed the issue where the CalculateAllValue() method returned incorrect formula results. |
| Bug Fix | SPIREXLS-6170 | Fixed the issue where page breaks were incorrect when converting Excel to PDF. |
Spire.Presentation
| Category | ID | Description |
| New Feature | SPIREPPT-660 | Added the FileFormat.Pptm enumeration type to support saving macro-enabled files. |
| New Feature | - | Added support for adding VBA modules.
Presentation ppt = new Presentation();
// Add VBA project to the document
IVbaProject vbaProject = ppt.VbaProject;
vbaProject.Name = "SampleVBAMacro";
vbaProject.CodePage = 936; // Set encoding to support Chinese characters
IVbaModule vbaModule = vbaProject.Modules.Add("SampleModule", VbaModuleType.Module);
vbaModule.SourceCode = @"
Sub ExampleMacro()
' Declare variables
Dim pptPres As Object
Dim pptSlide As Object
Dim pptShape As Object
' Set reference to the current presentation
Set pptPres = ActivePresentation
' Loop through all slides
Dim i As Integer
For i = 1 To pptPres.Slides.Count
Set pptSlide = pptPres.Slides(i)
' Add a title text box to each slide (msoTextOrientationHorizontal = 1)
Set pptShape = pptSlide.Shapes.AddTextbox(1, 50, 50, 600, 50)
pptShape.TextFrame.TextRange.Text = ""Slide "" & i & "" - Auto-generated by macro""
With pptShape.TextFrame.TextRange.Font
.Bold = -1 ' msoTrue = -1
.Size = 24
.Color.RGB = RGB(0, 102, 204)
End With
Next i
' Display completion message
MsgBox ""Macro execution completed! Processed "" & pptPres.Slides.Count & "" slides."", vbInformation, ""Operation Prompt""
End Sub";
ppt.SaveToFile("result.pptm", FileFormat.Pptm);
ppt.Dispose();
|
| New Feature | - | Added support for deleting VBA modules.
// Remove module by name
Presentation ppt1 = new Presentation();
ppt1.LoadFromFile(inputFile);
IVbaModule firstModule = ppt1.VbaProject.Modules[0];
sb.AppendLine("[Remove by Name]");
sb.AppendLine("Module Name: " + firstModule.Name);
sb.AppendLine("Module Type: " + firstModule.Type);
sb.AppendLine("Module Count Before Deletion: " + ppt1.VbaProject.Modules.Count);
ppt1.VbaProject.Modules.Remove(firstModule.Name);
sb.AppendLine("Module Count After Deletion: " + ppt1.VbaProject.Modules.Count);
ppt1.SaveToFile("result1.pptm", FileFormat.Pptm);
ppt1.Dispose();
// Remove module by index
Presentation ppt2 = new Presentation();
ppt2.LoadFromFile(inputFile);
sb.AppendLine("[Remove by Index (0)]");
sb.AppendLine("Module Count Before Deletion: " + ppt2.VbaProject.Modules.Count);
ppt2.VbaProject.Modules.RemoveAt(0);
sb.AppendLine("Module Count After Deletion: " + ppt2.VbaProject.Modules.Count);
ppt2.SaveToFile("result2.pptm", FileFormat.Pptm);
ppt2.Dispose();
// Remove module by VbaModule object (cast to specific type)
Presentation ppt3 = new Presentation();
ppt3.LoadFromFile(inputFile);
IVbaModule moduleObj = ppt3.VbaProject.Modules[4];
VbaModule vbaModule = (VbaModule)moduleObj;
sb.AppendLine("[Remove by Object]");
sb.AppendLine("Module Name: " + vbaModule.Name);
sb.AppendLine("Module Type: " + vbaModule.Type);
sb.AppendLine("Module Count Before Deletion: " + ppt3.VbaProject.Modules.Count);
ppt3.VbaProject.Modules.Remove(vbaModule);
sb.AppendLine("Module Count After Deletion: " + ppt3.VbaProject.Modules.Count);
ppt3.SaveToFile("result3.pptm", FileFormat.Pptm);
ppt3.Dispose();
// Clear all modules
Presentation ppt4 = new Presentation();
ppt4.LoadFromFile(inputFile);
sb.AppendLine("[Clear All]");
sb.AppendLine("Module Count Before Deletion: " + ppt4.VbaProject.Modules.Count);
ppt4.VbaProject.Modules.Clear();
sb.AppendLine("Module Count After Deletion: " + ppt4.VbaProject.Modules.Count);
ppt4.SaveToFile("result4.pptm", FileFormat.Pptm);
ppt4.Dispose();
|
| Bug Fix | - | Fixed an issue where applying multiple licenses failed to take effect. |
Spire.PDF
| 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. |
Spire.PdfViewer
| Category | ID | Description |
| Bug Fix | SPIREPDFVIEWER-625 | Fixed issue with previewing PDF file throwing "ArgumentNullException" error. |