We are excited to announce the release of Spire.Office for Java 5.4.5. This version brings some new features. For instance, Spire.XLS for Java supports setting a maximum number of pages to convert when converting Excel file to PDF, and supports using ApplyStyle() to apply the style for a cell range; Spire.PDF for Java supports setting SignImageLayout.Stretch to make signature picture automatically fit the signature field size. In addition, Spire.Doc for Java enhances the conversion from Word to PDF and Word to HTML. Meanwhile, a lot of bugs have been successfully fixed. More details are listed as follow.
Click the link to download Spire.Office for Java 5.4.5:
Here is a list of changes made in this release
Spire.XLS for Java
| Category | ID | Description |
| New feature | - | Supports setting a maximum number of pages to convert when converting Excel file to PDF.
workbook.loadFromFile(inputFile); //Fit to page workbook.getConverterSetting().setSheetFitToPage(true); //Set the maximum number of pages to convert workbook.getConverterSetting().setMaxConvertPages(); //Save to PDF file workbook.saveToFile(outputFile, FileFormat.PDF); workbook.dispose(); |
| New feature | SPIREXLS-3763 | Supports using ApplyStyle() to apply the style for a cell range.
//Create a Workbook object
Workbook workbook = new Workbook();
//Load a sample Excel file
workbook.loadFromFile("in.xlsx");
//Get the first worksheet
Worksheet sheet = workbook.getWorksheets().get(0);
//Create a CellStyle object
CellStyle fontStyle = workbook.getStyles().addStyle("headerFontStyle");
//Set the font color, size and style
fontStyle.getFont().setColor(Color.white);
fontStyle.getFont().isBold(true);
fontStyle.getFont().setSize(12);
fontStyle.setHorizontalAlignment(HorizontalAlignType.Center);
CellStyleFlag flag = new CellStyleFlag();
flag.setFontColor(true);
flag.setFontBold(true);
flag.setFontSize(true);
flag.setHorizontalAlignment(true);
//Apply style
sheet.getRange().get(1, 1, 1, 8).applyStyle(fontStyle, flag);
workbook.saveToFile("out.xlsx", ExcelVersion.Version2016);
|
| Bug | SPIREXLS-3730 | Fixes the issue that the application threw "Illegal characters in path" error when converting Excel file to Html. |
| Bug | SPIREXLS-3731 | Fixes the issue that the content was lost after converting Excel file to PDF. |
| Bug | SPIREXLS-3733 | Fixes the issue that the application threw " java.lang.IllegalAccessError" when converting Excel file to PDF with openjdk17. |
| Bug | SPIREXLS-3741 | Fixes the issue that the application hung a long time when converting Excel file to PDF. |
| Bug | SPIREXLS-3671 | Fixes the issue that the formula calculated incorrectly and some Chinese text was garbled after converting Excel file to PDF. |
| Bug | SPIREXLS-3755 | Fixes the issue that the output file was failed to open after adding watermark to an Excel file. |
| Bug | SPIREXLS-3761 | Fixes the issue that the transparency verification failed after converting Excel file to PDFA and doing a pre-flight checking in Adobe PDF. |
| Bug | SPIREXLS-3766 | Fixes the issue that the application threw "NullPointerException" when saving Excel file. |
Spire.PDF for Java
| Category | ID | Description |
| New feature | SPIREPDF-2425 | Supports setting SignImageLayout.Stretch to make signature picture automatically fit the signature field size.
signature.setSignImageLayout(SignImageLayout.Stretch); |
| Bug | SPIREPDF-3925 | Fixes the issue that the image background color was incorrect after adding a watermark. |
| Bug | SPIREPDF-5016 | Fixes the issue that the application threw "NullPointerException" when converting PDF to PDFA3A. |
| Bug | SPIREPDF-5030 | Fixes the issue that the content was incorrect after converting PDF to PDFA3A |
| Bug | SPIREPDF-5036 | Fixes the issue that the output effect was incorrect after filling polygon |
| Bug | SPIREPDF-5040 | Fixes the issue that the content was lost after converting OFD to PDF. |
| Bug | SPIREPDF-5042 SPIREPDF-5043 SPIREPDF-5048 SPIREPDF-5050 SPIREPDF-5051 |
Fixes the issue that the application threw "NumberFormatException" when converting PDF to Word. |
| Bug | SPIREPDF-5074 | Fixes the issue that the application threw "NullPointerException" when converting PDF to Word. |
Spire.Doc for Java
| Category | ID | Description |
| Bug | SPIREDOC-7062 SPIREDOC-7667 SPIREDOC-7702 |
Fixes the issue that the content was incorrect after converting Word to PDF. |
| Bug | SPIREDOC-7347 | Fixes the issue that the application threw "java.awt.image.RasterFormatException" when converting Word to PDF. |
| Bug | SPIREDOC-7378 | Fixes the issue that the content was lost after converting Word to PDF. |
| Bug | SPIREDOC-7396 | Fixes the issue that the table format of the saved Word file was incorrect. |
| Bug | SPIREDOC-7520 | Fixes the issue that it was failed to delete TextBox. |
| Bug | SPIREDOC-7522 | The NewEngine method fixes the issue that the text alignment was incorrect after converting Word to PDF. |
| Bug | SPIREDOC-7523 | The NewEngine method fixes the issue that the picture position was incorrect after converting Word to PDF. |
| Bug | SPIREDOC-7536 | Fixes the issue that the application threw "nullpointerexception" when converting Word to PDF. |
| Bug | SPIREDOC-7572 | The NewEngine method fixes the issue that the page number was incorrect after converting Word to PDF. |
| Bug | SPIREDOC-7574 | The NewEngine method fixes the issue that the page number and content were incorrect after converting Word to PDF. |
| Bug | SPIREDOC-7592 SPIREDOC-7629 |
Fixes the issue that the content format was incorrect after converting Word to PDF. |
| Bug | SPIREDOC-7617 | Fixes the issue that the application threw "'wsp' is undeclared namespace" when converting Word to PDF. |
| Bug | SPIREDOC-7619 | Fixes the issue that the page number was lost after converting Word to PDF. |
| Bug | SPIREDOC-7627 | Fixes the issue that the application threw "'ConcurrentModificationException" when converting Html to Word. |
| Bug | SPIREDOC-7666 | Fixes the issue that some text were overlapped after converting Word to Html. |
| Bug | SPIREDOC-7669 | Fixes the issue that the application threw "'IllegalStateException" when loading a Word file stream. |
| Bug | SPIREDOC-7675 | Fixes the issue that the image was lost after converting Word to Html. |