We are excited to announce the release of Spire.Office for Java 7.9.6. In this version, Spire.XLS for Java supports using Worksheet.getMaxDispalyRange() method to get all cell ranges; Spire.PDF for Java supports creating unordered lists in PDF; Spire.Doc for Java enhances the conversion from Word to PDF. Besides, a lot of known issues are fixed successfully in this version. More details are listed below.
Click the link to download Spire.Office for Java 7.9.6:
Here is a list of changes made in this release
Spire.XLS for Java
| Category | ID | Description |
| New feature | SPIREXLS-4002 | Supports using Worksheet.getMaxDispalyRange() method to get all cell ranges, including objects such as pictures and shapes.
Workbook workbook = new Workbook();
workbook.loadFromFile("TEST.xlsx");
Worksheet sheet1 = workbook.getWorksheets().get(0);
//copy all objects(such as text, shape, image...) from sheet2 to sheet1
for(int i=1;i<workbook.getWorksheets().getCount(); i++){
Worksheet sheet2 = workbook.getWorksheets().get(i);
sheet2.copy((CellRange) sheet2.getMaxDisplayRange(),sheet1,sheet1.getLastRow()+1,
sheet2.getFirstColumn(),true);
}
workbook.saveToFile("output.xlsx", ExcelVersion.Version2013);
|
| New feature | SPIREXLS-4026 | Supports the =Days() function.
Workbook workbook = new Workbook();
workbook.loadFromFile("Test.xlsx");
Worksheet sheet = workbook.getWorksheets().get(0);
sheet.getCellRange("C4").setFormula("=DAYS(A8,A1)");
workbook.saveToFile(""RES.xlsx"");
|
| Bug | SPIREXLS-3980 | Fixes the issue that the content format was incorrect after converting xml file to Excel. |
| Bug | SPIREXLS-3995 | Fixes the issue that the chart title was incorrect after converting Excel to SVG. |
| Bug | SPIREXLS-4014 | Fixes the issue that the content format was incorrect after converting Excel file to PDF. |
| Bug | SPIREXLS-4020 | Fixes the issue that the application threw "StringIndexOutOfBoundsException" when converting Excel file to PDF. |
| Bug | SPIREXLS-4054 | Fixes the issue that the application threw "NullPointerException" when getting the chart DataRange. |
| Bug | SPIREXLS-4070 | Fixes the issue that the application threw "FileSystemException" when calling Files.deleteIfExists() to delete the file that was detected by the isPasswordProtected() method. |
| Bug | SPIREXLS-2862 | Fixes the issue that the line feed was incorrect when converting Excel document to PDF. |
| Bug | SPIREXLS-2986 SPIREXLS-3019 |
Fixes the issue that the page margin was incorrect when converting Excel document to PDF. |
| Bug | SPIREXLS-4043 | Fixes the issue that the table layout was incorrect when converting Excel document to HTML. |
| Bug | SPIREXLS-4072 | Fixes the issue that the application threw "java.lang.NullPointerException" when modifying the selected value of the filter in the PivotTable. |
| Bug | SPIREXLS-4073 | Fixes the issue that the table cell's borders lost when converting Excel document to PDF. |
| Bug | SPIREXLS-4075 | Fixes the issue that the text direction of X-axis was incorrect when converting chart to image. |
| Bug | SPIREXLS-4012 | Fixes the issue that the document size was not reduced after removing the pictures in header/footer. |
| Bug | SPIREXLS-4105 | Fixes the issue that the application threw "Unknown char:%" when loading an Excel file. |
Spire.PDF for Java
| Category | ID | Description |
| New feature | - | Supports creating unordered lists in PDF.
public void DrawMarker(PdfUnorderedMarkerStyle style, String outputFile) {
PdfDocument doc = new PdfDocument();
PdfNewPage page = (PdfNewPage) doc.getPages().add();
PdfMarker marker = new PdfMarker(style);
String listContent = "Data Structure\n"
+ "Algorithm\n"
+ "Computer Newworks\n"
+ "Operating System\n"
+ "C Programming\n"
+ "Computer Organization and Architecture";
PdfUnorderedList list = new PdfUnorderedList(listContent);
list.setIndent(2);
list.setTextIndent(4);
list.setMarker(marker);
list.draw(page, 100, 100);
doc.saveToFile(outputFile, FileFormat.PDF);
doc.close();
}
public void PdfMarker_CustomImage() throws Exception {
String outputFile = "PdfMarker_CustomImage.pdf";
String inputFile_Img = "sample.png";
PdfDocument doc = new PdfDocument();
PdfNewPage page = (PdfNewPage) doc.getPages().add();
PdfMarker marker = new PdfMarker(PdfUnorderedMarkerStyle.Custom_Image);
marker.setImage(PdfImage.fromFile(inputFile_Img));
String listContent = "Data Structure\n"
+ "Algorithm\n"
+ "Computer Newworks\n"
+ "Operating System\n"
+ "C Programming\n"
+ "Computer Organization and Architecture";
PdfUnorderedList list = new PdfUnorderedList(listContent);
list.setIndent(2);
list.setTextIndent(4);
list.setMarker(marker);
list.draw(page, 100, 100);
doc.saveToFile(outputFile, FileFormat.PDF);
doc.close();
}
public void PdfMarker_CustomTemplate() throws Exception {
String outputFile = "PdfMarker_CustomTemplate.pdf";
String inputFile_Img = "sample.png";
PdfDocument doc = new PdfDocument();
PdfNewPage page = (PdfNewPage) doc.getPages().add();
PdfMarker marker = new PdfMarker(PdfUnorderedMarkerStyle.Custom_Template);
PdfTemplate template = new PdfTemplate(210, 210);
marker.setTemplate(template);
template.getGraphics().drawImage(PdfImage.fromFile(inputFile_Img), 0, 0);
String listContent = "Data Structure\n"
+ "Algorithm\n"
+ "Computer Newworks\n"
+ "Operating System\n"
+ "C Programming\n"
+ "Computer Organization and Architecture";
PdfUnorderedList list = new PdfUnorderedList(listContent);
list.setIndent(2);
list.setTextIndent(4);
list.setMarker(marker);
list.draw(page, 100, 100);
doc.saveToFile(outputFile, FileFormat.PDF);
doc.close();
}
public void PdfMarker_CustomString() throws Exception {
String outputFile = "PdfMarker_CustomString.pdf";
PdfDocument doc = new PdfDocument();
PdfNewPage page = (PdfNewPage) doc.getPages().add();
PdfMarker marker = new PdfMarker(PdfUnorderedMarkerStyle.Custom_String);
marker.setText("AAA");
String listContent = "Data Structure\n"
+ "Algorithm\n"
+ "Computer Newworks\n"
+ "Operating System\n"
+ "C Programming\n"
+ "Computer Organization and Architecture";
PdfUnorderedList list = new PdfUnorderedList(listContent);
list.setIndent(2);
list.setTextIndent(4);
list.setMarker(marker);
list.draw(page, 100, 100);
doc.saveToFile(outputFile, FileFormat.PDF);
doc.close();
|
| Adjustment | - | Adjusts the internal security of signed timestamps. |
| Bug | SPIREPDF-4780 | Fixes the issue that caused long running time and high memory consumption during converting PDF to Tiff. |
| Bug | SPIREPDF-5387 | Fixes the issue that the application threw "Read failure" when loading PDF file. |
| Bug | SPIREPDF-5390 | Fixes the issue that the bold font was lost when converting PDF to Excel |
| Bug | SPIREPDF-5402 | Fixes the issue that the memory overflowed when converting PDF to Excel |
| Bug | SPIREPDF-5419 | Fixes the issue that the application threw "java.lang.NullPointerException" when converting PDF to Excel |
| Bug | SPIREPDF-5422 SPIREPDF-5435 |
Fixes the issue that the extracted table's contents were incomplete |
| Bug | SPIREPDF-5423 | Fixes the issue that the contents were overlapped after flattening combo box fields |
| Bug | SPIREPDF-5438 | Fixes the issue that arabic characters displayed incorrectly when converting PDF to PDFA3A |
| Bug | SPIREPDF-5446 | Fixes the issue that the application threw "java.lang.NullPointerException" when converting PDF to image |
Spire.Doc for Java
| Category | ID | Description |
| Bug | SPIREDOC-7704 | Fixes the issue that the application thrown "IllegalArgumentException" after setting the private fonts in otf format when converting Word to PDF. |
| Bug | SPIREDOC-7841 | Fixes the issue that embedding private fonts failed when converting Word to PDF. |
| Bug | SPIREDOC-8242 | Fixes the issue that the content alignment became inconsistent when converting DOC to DOCX2007. |