Spire.Office for Java 3.11.0

Spire.Office for Java 3.11.0 is released

We're pleased to announce the release of Spire.Office for Java 3.11.0. This version contains some fantastic features, for example, Spire.PDF for Java supports inserting SVG to PDF and getting PDF watermark, Spire.XLS for Java supports repeating item labels of PivotTable field. Besides, it also fixes many issues occurred while loading, manipulating, extracting and converting Word, Excel, PDF, PowerPoint documents. You can find detailed information from the following lists.

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

Here is a list of changes made in this release

Spire.Doc for Java

Category ID Description
Bug SPIREDOC-4380 Fixes the issue that the application hung after inserting the TOC.
Bug SPIREDOC-4415 Fixes the issue that the application threw the error "StackOverflowError" when updating the TOC.
Bug SPIREDOC-4952 Fixes the issue that some content was lost after converting Word to PDF.
Bug SPIREDOC-4964 Fixes the issue that the application threw the error "Object reference not set to an instance of an object." When converting Word to PDF.
Bug SPIREDOC-4970 Fixes the issue that the application threw "Unexpected EOF parsing start tag 'span'" when converting HTML string to Word.
Bug SPIREDOC-4993
SPIREDOC-5005
Fixes the issue that the images were rendered incorrectly after converting HTML string to Word.
Bug SPIREDOC-4998 Fixes the issue that it caused incorrect page number after converting Word to PDF.

Spire.PDF for Java

Category ID Description
Optimization SPIREPDF-3387
SPIREPDF-3620
Optimizes conversion time for PDF to Image.
Optimization SPIREPDF-3569 Optimizes the time for adding text watermark into PDF
New feature SPIREPDF-3390 Supports getting PDF watermark.
PdfDocument pdf = new PdfDocument();
pdf.loadFromFile(outputFile);
PdfAnnotationCollection annotationWidget= pdf.getPages().get(0).getAnnotationsWidget();
StringBuffer stringBuffer = new StringBuffer();
for(int i=0;i < annotationWidget.getCount();i++){
if (annotationWidget.get(i) instanceof PdfWatermarkAnnotationWidget){
  stringBuffer.append(annotationWidget.get(i).getText()+"\r\n");
}
New feature SPIREPDF-3596 Supports inserting SVG to PDF.
String inputFile_svg = "data/sample.svg";
String inputFile_pdf = "data/sample.pdf";
String outputFile = "result.pdf";
PdfDocument doc1 = new PdfDocument();
doc1.loadFromSvg(inputFile_svg);
PdfDocument doc2 = new PdfDocument();
doc2.loadFromFile(inputFile_pdf);
PdfTemplate template = doc1.getPages().get(0).createTemplate();
template.draw(doc2.getPages().get(0).getCanvas(), new Point2D.Float());
doc2.saveToFile(outputFile, FileFormat.PDF);
Bug SPIREPDF-3540 Fixes the issue that finding keywords failed.
Bug SPIREPDF-3558 Fixes the issue that the memory kept growing when converting PDF to Image.
Bug SPIREPDF-3616 Fixes the issue that the application got stuck when converting PDF to Image.
Bug SPIREPDF-3624 Fixes the issue that the application threw "java.lang.NullPointerException" when extracting text from PDF pages.
Bug SPIREPDF-3629
SPIREPDF-3632
Fixes the issue that the application threw "outofmemeory" when extracting text from a PDF file that has problematic font.
Bug SPIREPDF-3639 Fixes the issue that the application threw "java.lang.NullPointerException" when converting PDF to Word.

Spire.XLS for Java

Category ID Description
New Feature SPIREXLS-2770 Supports repeating item labels in the PivotTable field.
pt.getPivotFields().get("Month").isRepeatItemLabels(true);
Bug SPIREXLS-2679 Fixes the issue that an error prompted when opening the result file after copying the sheet.
Bug SPIREXLS-2730 Fixes the issue that it caused incorrect content after converting Excel to PDF.
Bug SPIREXLS-2811 Fixes the issue that the content and format were incorrect after converting Excel to HTML.
Bug SPIREXLS-2812 Fixes the issue that the pictures were not rendered correctly after converting Excel to HTML.
Bug SPIREXLS-2838 Fixes the issue that the header was not rendered correctly after converting Excel to PDF.
Bug SPIREXLS-2839 Fixes the issue that sorting by cell background color and font color failed.
Bug SPIREXLS-2849 Fixes the issue that it got wrong row count when loading the document from stream.

Spire.Presentation for Java

Category ID Description
Bug SPIREPPT-1277 Fixes the issue that the application threw the exception "ExceptionInInitializerError" when converting PPT to PDF in multi-thread.
Bug SPIREPPT-1322 Fixes the issue that the content was clipped after converting shape to Image
Bug SPIREPPT-1324 Fixes the issue that caused blank image and incomplete image after converting shape to image.
Bug SPIREPPT-1327 Fixes the issue that the application threw the exception "NullPointerException" when converting shape to image.
Bug SPIREPPT-1328 Fixes the issue that the application hung when converting shape to image.
Bug SPIREPPT-1329 Fixes the issue that the application threw the exception "Property not found" when loading a PPTX file.
Bug SPIREPPT-1343 Fixes the issue that the application threw the exception "NullPointerException" when getting the entry&exit effect of animation.
Bug SPIREPPT-1347 Fixes the issue that the text font was changed after converting PPT to image.
Bug SPIREPPT-1343 Fixes the issue that the application executed in multi-thread threw the exception "Could not initialize class com.spire.presentation.packages.sprxmc".