We are excited to announce the release of Spire.Office for Java 5.1.5. This version brings some new features, for instance, Spire.Doc for Java supports setting "Allow Latin text to wrap in the middle of a word" for paragraphs; Spire.Presentation for Java supports converting PowerPoint file to OFD as well as supports getting the image path of the PowerPoint file; Spire.PDF for Java supports getting PDF PieceInfo dictionary information as well as supports printing by a specified printer. In addition, Spire.XLS for Java enhances the conversion from Excel to PDF/HTML/images, as well as HTML to Excel. 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.1.5:
Here is a list of changes made in this release
Spire.Doc for Java
Category | ID | Description |
New feature | SPIREDOC-5499 | Supports setting "Allow Latin text to wrap in the middle of a word" for paragraphs.
Paragraph pa = document.getSections().get(0).getParagraphs().get(0); pa.getFormat().setWordWrap(false); pa.getFormat().getWordWrap(); |
Bug | SPIREDOC-6592 | Fixes the issue that the objects name were inconsistent while openning the saved Word document via WPS. |
Bug | SPIREDOC-6932 | Fixes the issue that the content format was incorrect when converting Word file to PDF. |
Bug | SPIREDOC-6958 | Fixes the issue that the application threw "OutOfMemoryError" when converting Word file to PDF. |
Bug | SPIREDOC-6961 SPIREDOC-7022 |
Fixes the issue that the text obtained were incorrect. |
Bug | SPIREDOC-6967 | Fixes the issue that the content was overlapped after converting Word file to PDF. |
Bug | SPIREDOC-6985 | Fixes the issue that the content was incorrect after converting xml file to PDF. |
Bug | SPIREDOC-6988 SPIREDOC-7072 |
Fixes the issue that the application hung a long time but no output file when converting Word file to PDF. |
Bug | SPIREDOC-7048 | Fixes the issue that the application threw "ArrayIndexOutOfBoundException" when converting a Word document that was inserted table data to PDF. |
Bug | SPIREDOC-7052 | Fixes the issue that the table column width setting didn't take effect after converting a Word document to PDF. |
Bug | SPIREDOC-7073 | Fixes the issue that the application threw ""IllegalArgumentException"" when loading the Word document that after doing compare. |
Bug | SPIREDOC-7075 | Fixes the issue that the picture position was wrong after converting a Word document to PDF. |
Bug | SPIREDOC-7127 | Fixes the issue that the application threw "ClassCastException" when converting the Word document which was embedded OpenType fonts to PDF. |
Bug | SPIREDOC-7128 | Fixes the issue that the text position was incorrect after accept changes. |
Bug | SPIREDOC-7145 | Fixes the issue that the application threw "Item has already been added" error when loading a Word document. |
Bug | SPIREDOC-7150 | Fixes the issue that the application threw "NullPointerException" when loading a Word document. |
Bug | SPIREDOC-6464 SPIREDOC-7067 |
Fixes the issue that the application threw "IndexOutOfBoundsException" when updating the table of content of the Word document. |
Bug | SPIREDOC-6921 SPIREDOC-7107 |
Fixes the issue that the generated file has extra blank pages after converting the Word file to PDF. |
Bug | SPIREDOC-6954 | Fixes the issue that the generated file cannot be opened after converting the Word file to PDF. |
Bug | SPIREDOC-6980 | Fixes the issue that the generated file has duplicate images after converting the Word file to PDF. |
Bug | SPIREDOC-7026 | Fixes the issue that the font of the generated file was changed after converting the Word file to HTML. |
Bug | SPIREDOC-7041 | Fixes the issue that the location of the table in the generated file has changed after converting the Word file to PDF. |
Bug | SPIREDOC-7045 | Fixes the issue that the value of the list in the generated file was incorrect after converting the Word file to HTML. |
Bug | SPIREDOC-7047 | Fixes the issue that the application was out of memory when updating the table of content of the Word document. |
Bug | SPIREDOC-7064 | Fixes the issue that the application threw "NullPointerException" when comparing the Word files. |
Bug | SPIREDOC-7099 | Fixes the issue that the menclose label displayed incorrectly in the generated file after adding ML math code to the Word file. |
Bug | SPIREDOC-7101 | Fixes the issue that the application took long time when updating the table of content of the Word document. |
Bug | SPIREDOC-7106 SPIREDOC-7156 SPIREDOC-7159 |
Fixes the issue that the location of the content in the generated file was incorrect after converting the Word file to PDF. |
Bug | SPIREDOC-7110 | Fixes the issue that the frame of the image in the generated file was disappeared after converting the Word file to PDF. |
Bug | SPIREDOC-7119 | Fixes the issue that the generated file has an extra content after accepting the track changes of the Word file. |
Bug | SPIREDOC-7125 | Fixes the issue that the tap size of the table in the generated file was changed after combining the Word files. |
Bug | SPIREDOC-7137 | Fixes the issue that the content of the generated file is different with the original file after converting the Word file to Images. |
Bug | SPIREDOC-7149 | Fixes the issue that the application threw "NullPointerException" when converting the Word file to HTML. |
Bug | SPIREDOC-7151 | Fixes the issue that the application threw "Item has already been added" when loading the Word file. |
Bug | SPIREDOC-7160 | Fixes the issue that the content of the page number of the footer in the generated file was incorrect after converting the Word file to PDF. |
Bug | SPIREDOC-7171 | Optimizes the speed of converting the Word file to PDF. |
Bug | SPIREDOC-7176 | Fixes the issue that the value of the list in the generated file was incorrect after converting a Doc format Word file to Docx format. |
Bug | SPIREDOC-7178 | Fixes the issue that the result was incorrect after splitting the table cell of the Word file. |
Bug | SPIREDOC-7184 | Fixes the issue that the effect of the generated file was different with the MS Word generated after updating the table of content of the Word file. |
Bug | SPIREDOC-7206 | Fixes the issue that the content of the math formula was incorrect when recognizing formulas in Word. |
Spire.Presentation for Java
Category | ID | Description |
New feature | SPIREPPT-1778 | Supports getting the image path of the PowerPoint file.
ImageCollection images = ppt.getImages(); for (int i = 0; i < images.size(); i++) { IImageData imageData = images.get(i); String path = imageData.getRelativePath(); } |
New feature | SPIREPPT-1780 | Supports converting PPT file to OFD.
Presentation ppt = new Presentation(); ppt.loadFromFile(inputFile); //Save the PowerPoint to OFD file format ppt.saveToFile(outputFile, FileFormat.OFD); ppt.dispose(); |
Bug | SPIREPPT-1777 | Fixes the issue that the application threw "ArrayIndexOutOfBoundException" when getting Chart data. |
Bug | SPIREPPT-1781 | Fixes the issue that the content was lost after saving a slide to image. |
Bug | SPIREPPT-1461 | Fixes the issue that the application threw "Error reading WMF metafile" when saving shape to image. |
Bug | SPIREPPT-1818 | Fixes the issue that the application threw "ArrayIndexOutOfBoundsException" when loading a PowerPoint file which was set water mark. |
Bug | SPIREPPT-1831 | Fixes the issue that the application threw "ArrayIndexOutOfBoundsException" when loading a PowerPoint file. |
Bug | SPIREPPT-1798 | Fixes the issue that the application threw "NullPointerException" when loading a PowerPoint document. |
Spire.PDF for Java
Category | ID | Description |
New feature | SPIREPDF-4782 | Supports printing by a specified printer.
//Specify the printer name to print PrintSettings setting = pdf.getPrintSettings(); setting.setPrinter("Adobe PDF"); //Getsystem default printer PrinterJob loPrinterJob = PrinterJob.getPrinterJob(); PrintService printer = loPrinterJob.getPrintService(); String PrinterName = printer.getName(); //set to use the current printer loPrinterJob.setPrintService(printer); |
New feature | SPIREPDF-4829 | Supports getting PDF PieceInfo dictionary information.
PdfDocument pdf = new PdfDocument(); pdf.loadFromFile(inputFile); StringBuilder sb = new StringBuilder(); PdfPieceInfo info = pdf.getDocumentPieceInfo(); ArrayList<Object> values = new ArrayList<Object>(); HashMap<String, PdfApplicationData> dic = info.getApplicationDatas(); for (Map.Entry<String, PdfApplicationData> item : dic.entrySet()) { PdfApplicationData data = item.getValue(); values.add(data.getPrivate()); String content = data.getPrivate().toString(); } PdfPageBase page = pdf.getPages().get(0); PdfPieceInfo infor2 = page.getPagePieceInfo(); HashMap<String, PdfApplicationData> dic2 = infor2.getApplicationDatas(); for (Map.Entry<String, PdfApplicationData> item2 : dic2.entrySet()) { PdfApplicationData data2 = item2.getValue(); if (data2.getPrivate() instanceof String) { String content = data2.getPrivate().toString(); } } |
Bug | SPIREPDF-4546 | Optimized the the bold font was blurred after printing PDF. |
Bug | SPIREPDF-4788 | Fixes the issue that the application threw "ArrayIndexOutOfBoundsException" when loading PDF document. |
Bug | SPIREPDF-4798 SPIREPDF-4799 SPIREPDF-4800 SPIREPDF-4812 |
Fixes the issue that the content format was incorrect when converting PDF to Word document. |
Bug | SPIREPDF-4816 | Fixes the issue that the picture of PDF file was not displayed correctly after compressing. |
Bug | SPIREPDF-4817 | Fixes the issue that the saved stream was incorrect when converting PDF to SVG. |
Bug | SPIREPDF-4841 | Fixes the issue that it needed an open password when using WPS to open the PDF that only set a permission password. |
Bug | SPIREPDF-4842 | Fixes the issue that it was unable to get the PDF used fonts. |
Spire.XLS for Java
Category | ID | Description |
Bug | SPIREXLS-3540 | Fixes the issue that the application threw an exception when loading excel file. |
Bug | SPIREXLS-3561 | Fixes the issue that the page number position was incorrect after converting excel file to PDF. |
Bug | SPIREXLS-3574 | Fixes the issue that some chart data lost after converting excel file to PDF. |
Bug | SPIREXLS-3587 | Fixes the issue that the application threw "NullPointerException" when converting Html to excel. |
Bug | SPIREXLS-3600 | Fixes the issue that the OLE object obtained was incorrect. |
Bug | SPIREXLS-3603 | Fixes the issue that the content format was incorrect after converting excel file to Html. |
Bug | SPIREXLS-3607 | Fixes the issue that the content was incorrect after converting excel file to image. |
Bug | SPIREXLS-3608 | Fixes the issue that the application threw error ("utf-8 http-equiv=Content-Type is not a supported encoding") when loading a Html file. |
Bug | SPIREXLS-3609 | Fixes the issue that the application threw "NullPointerException" when getting excel cell formula value. |