Spire.Office for Java 4.5.2

Spire.Office for Java 4.5.2 is released

We are happy to announce the release of Spire.Office for Java 4.5.2. This version brings some new features, for example, Spire.XLS for Java adds a new method to get group boxes and supports specifying the font file directory when converting Excel to PDF; Spire.Presentation for Java adds a new method to add images to PPT via stream. Meanwhile, a lot of bugs have been fixed. More details are listed as follows.

Click the link to download Spire.Office for Java 4.5.2:

Here is a list of changes made in this release

Spire.XLS for Java

Category ID Description
New feature SPIREXLS-3216 Adds a new method getGroupBoxes to get the group boxes.
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
Worksheet worksheet = workbook.getWorksheets().get(0);
IGroupBoxes groupBoxs = worksheet.getGroupBoxes();
New feature SPIREXLS-3219 Supports specifying the font file directory when converting Excel to PDF.
Workbook workbook = new Workbook();
workbook.loadFromFile(inputFile);
workbook.setCustomFontFileDirectory(new String[]{.DataFont});
Hashtable hashtable = workbook.getCustomFontParsedResult();
workbook.saveToFile(outputFile, FileFormat.PDF);
workbook.dispose();
Bug SPIREXLS-3196
SPIREXLS-3227
Fixes the issue that the content was incorrect after converting Excel to PDF.
Bug SPIREXLS-3227 Fixes the issue that the inserted image was stretched.
Bug SPIREXLS-3228 Fixes the issue that the application threw the error NullPointerException when determining whether a cell contains a formula.
Bug SPIREXLS-3237 Fixes the issue that the application threw the error NullPointerException when converting Excel to PDF.
Bug SPIREXLS-3240 Fixes the issue that the content was incorrect after converting Excel to images.
Adjustment SPIREXLS-3252 Adjusts the name of the method to determine whether a document is password protected or not.

Spire.PDF for Java

Category ID Description
Bug SPIREPDF-4260 Fixes the issue that the content of the PDF document was lost after adding the watermark.
Bug SPIREPDF-4257 Fixes the issue that it failed to fill the field of the PDF/A document.
Bug SPIREPDF-4233 Optimizes the size of the generated file when converting PDF to HTML.

Spire.Presentation for Java

Category ID Description
New feature SPIREPPT-1545 Supports specifying the font file directory when converting PPT to PDF.
Presentation ppt = new Presentation();
ppt.loadFromFile("source.pptx");
ppt.setCustomFontsFolder("Fonts\\");
ppt.saveToFile("result.pdf", FileFormat.PDF);
New feature SPIREPPT-1558 Adds a new method "append(InputStream inputStream)" to add images to PPT via stream.
Presentation ppt = new Presentation();
ppt.loadFromFile(inputFile);
FileInputStream fileInputStream=new FileInputStream(intputFile_Img);
IImageData imageData=ppt.getImages().append(fileInputStream);
SlidePicture slidePictrue=(SlidePicture) ppt.getSlides().get(0).getShapes().get(0);
slidePictrue.getPictureFill().getPicture().setEmbedImage(imageData);
ppt.saveToFile(outputFile, FileFormat.PPTX_2013);
Bug SPIREPPT-1543 Optimizes the memory consumption when converting PPT to PDF.
Bug SPIREPPT-1557 Fixes the issue that the inserted image was incorrect.