We are excited to announce the release of Spire.Office for Java 5.2.2. This version includes some new features and enhancements, for instance, Spire.PDF for Java supports converting TIFF and OFD files to PDF and enhances the conversions from PDF to HTML, PDF to PDFA1B, PDF to PDFA2A, PDF to image; Spire.Doc for Java supports finding all matched strings in a paragraph and enhances the conversions from Word to PDF and HTML to Word. In addition, some known issues have also been fixed in this update. More details are listed below.
Click the link to download Spire.Office for Java 5.2.2:
Here is a list of changes made in this release
Spire.PDF for Java
Category | ID | Description |
New feature | SPIREPDF-4131 | Supports converting TIFF files to PDF.
PdfDocument doc = new PdfDocument(); PdfPageBase page = doc.getPages().add(); PdfImage myTiff = PdfImage.fromFile("TiffToPdf.tiff"); page.getCanvas().drawImage(myTiff, 60, 60, 260, 150); doc.saveToFile("output.pdf", FileFormat.PDF); |
New feature | SPIREPDF-4892 | Supports determining whether PDF file was password encrypted.
boolean isPasswordProtected = PdfDocument.isPasswordProtected(inputFile); |
New feature | - | Supports converting OFD format to PDF.
OfdConverter converter = new OfdConverter(inputFile); converter.toPdf(outputFile); |
Bug | SPIREPDF-4827 | Fixes the issue that the content displayed incorrectly after converting PDF to image. |
Bug | SPIREPDF-4857 | Fixes the issue that some content lost after converting PDF to Html. |
Bug | SPIREPDF-4863 | Fixes the issue that the verification failed after converting PDF to PDFA1B. |
Bug | SPIREPDF-4877 | Fixes the issue that the application threw "NullPointerException" when converting PDF to image. |
Bug | SPIREPDF-4888 | Fixes the issue that the application threw "NullPointerException" when getting PDF attachments. |
Bug | SPIREPDF-4890 | Fixes the issue that the application threw "NullPointerException" when finding PDF text. |
Bug | SPIREPDF-4913 | Fixes the issue that the application threw "NullPointerException" when converting PDF to PDFA2A. |
Spire.Doc for Java
Category | ID | Description |
New feature | SPIREDOC-3990 | Supports finding all matched strings in a paragraph.
Document document = new Document(); document.loadFromFile("Sample.docx"); Section s = document.getSections().get(0); Paragraph para = s.getParagraphs().get(0); //the first method TextSelection[] textSelections = para.findAllString("The", false, true); for (TextSelection selection : textSelections) { //highlight selection.getAsOneRange().getCharacterFormat().setHighlightColor(new Color(255, 255, 0)); } //the second method Pattern c = Pattern.compile("The"); TextSelection[] textSelections = para.findAllPattern(c); for (TextSelection selection : textSelections) { TextRange[] results = selection.getAsRange(); for (TextRange result : results) { //highlight result.getCharacterFormat().setHighlightColor(Color.yellow); } } |
Bug | SPIREDOC-7038 | Fixes the issue that the application threw "Operation is not valid due to the current state of the object" when loading a Word file. |
Bug | SPIREDOC-7182 | Fixes the issue that the finding result was incorrect. |
Bug | SPIREDOC-7200 SPIREDOC-7202 SPIREDOC-7239 |
Fixes the issue that the content format was incorrect after converting Word file to PDF. |
Bug | SPIREDOC-7214 | Fixes the issue that the table content format was incorrect after accepting changes. |
Bug | SPIREDOC-7224 | Fixes the issue that some page lost after converting Word file to PDF. |
Bug | SPIREDOC-7236 | Fixes the issue that the application threw "OutOfMemoryError" when converting Word file to PDF. |
Bug | SPIREDOC-7240 | Fixes the issue that some text was overlapped after converting Word file to PDF. |
Bug | SPIREDOC-7242 | Fixes the issue that the application threw "IndexOutOfBoundsException" when converting a HTML file to Word. |
Bug | SPIREDOC-7254 | Fixes the issue that the list content was incorrect after converting Word file to PDF. |
Bug | SPIREDOC-7269 | Fixes the issue that the table content format was incorrect after accepting changes. |
Bug | SPIREDOC-7272 | Fixes the issue that the PDF file could not generate when converting Word file to PDF. |
Bug | SPIREDOC-7310 | Fixes the issue that the table content lost after converting Word file to PDF. |
Bug | SPIREDOC-7316 | Fixes the issue that the application threw "NullPointerException" when loading a Word file. |
Bug | SPIREDOC-7374 | Fixes the issue that the application threw "Namespace URI must not be null when prefix is not an empty string" when saving a Word file. |