Spire.Office for Java

Spire.Office for Java 2.9.0 is released

We're pleased to announce the release of Spire.Office for Java 2.9.0. This version adds a series of new features, including updating TOC in Word document, printing PowerPoint files discontinuously, inserting or appending round rectangle and getting the name of theme layout in PowerPoint files, setting the font of PDF signatures and converting a PDF file with multiple pages to an SVG. In addition, numerous issues that occurred when loading, converting and processing Word, PDF and PowerPoint files have been fixed. View the complete list of new features and bug fixes below.

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

Spire.Doc for Java

New Features:

  • Adds “UpdateTableOfContents(TableOfContent toc)” to update TOC.

Bug Fixes:

  • Fixes the issue that updating field "=SUM(ABOVE)" failed.
  • Fixes the issue that the application threw an exception when loading HTML.
  • Fixes the issue that the created hyperlink was invalid.
  • Fixes the issue that the application threw an exception "NullPointerException" when loading a Word file.
  • Fixes the issue that the application threw an exception when converting a Word file to PDF.
  • Fixes the issue that the application threw “StackOverflowError” exception when converting a Doc file to PDF.
  • Fixes the issue that the application threw an exception when loading a file.
  • Fixes the issue that the application threw an exception when saving a file after deleting break.
  • Fixes the issue that the application threw an exception when removing the breaks of page and section.
  • Fixes the issue that the footer displayed incorrectly when converting a Word file to PDF.
  • Fixes the issue that the table content was overlapped when converting a Word file to PDF.
  • Fixes the issue that the Chinese character displayed incorrectly when converting a Word file to PDF.
  • Fixes the issue that the extra character ('?') appeared when converting a Rtf file to Docx.

Spire.Presentation for Java

New Features:

  • Supports discontinuous printing.
  • Presentation ppt = new Presentation();
    ppt.loadFromFile(inputfile);
    PresentationPrintDocument document = new PresentationPrintDocument(ppt);
    
    //Set discontinuous print area
    document.selectSlidesForPrint("1", "2-6");
    ppt.print(document);
    ppt.dispose();
    
  • Supports inserting/appending round rectangle and setting the radius of round rectangle.
  • Presentation ppt = new Presentation();
    ppt.getSlides().get(0).getShapes().insertRoundRectangle(0,60,90,100,200,36);
    ppt.getSlides().get(0).getShapes().appendRoundRectangle(60,290,100,200,50);
    ppt.saveToFile("result.pptx", FileFormat.PPTX_2013);
    
  • Supports getting name of theme layout.
  • Presentation ppt = new Presentation();
     ppt.loadFromFile(file);
     for(int i =0;i < ppt.getSlides().getCount();i++)
     {    
         String name = ppt.getSlides().get(i).getLayout().getName();    
         System.out.println(name) ; 
     }
    

Bug Fixes:

  • Fixed the issue that the presentation could not be released successfully.
  • Fixed the issue that incorrect content was caused after copying slides from one presentation to another presentation.
  • Fixed the issue that the application threw an exception "Object reference not set to an instance of an object" when converting PPT to PDF.
  • Fixed the issue that the generated PPTX prompted an error after adding an image for master.

Spire.PDF for Java

New Features:

  • Supports setting the font of signature.
  • signature.setSignDetailsFont(new PdfFont(PdfFontFamily.Times_Roman,10f));
    signature.setSignNameFont(new PdfFont(PdfFontFamily.Courier,15));
    //define a font to support chinese character.
    PdfTrueTypeFont font = new PdfTrueTypeFont (new Font("SimSum",Font.PLAIN,10));
    signature.setSignDetailsFont(font);
    
  • Supports converting a PDF file with multiple pages to an SVG.
  • PdfDocument document = new PdfDocument(inputPath);
    document.loadFromFile(inputPath);
    document.getConvertOptions().setOutputToOneSvg(true);
    document.saveToFile("result.svg", FileFormat.SVG);
    

Bug Fixes:

  • Fixed the issue that caused messy content after converting PDF to Word.
  • Fixed the issue that the text of TextBox field could not be returned correctly.
  • Fixed the issue that caused incorrect format after converting PDF to HTML.
  • Fixed the issue that the Chinese characters could not be found successfully.
  • Fixed the issue that caused an exception when converting PDF to HTML.
  • Fixed the issue that if the PDF field has a black border, but after converting the PDF to SVG, the whole field became black.
  • Fixed the issue that after creating TextBoxField, the setBackColor didn't take effect and the field value didn't appear.
  • Fixed the issue that failed to save PDF after setting signature font in Chinese and setting GraphicMode for signature.