We are excited to announce the release of Spire.Office for Java 9.10.0. In this version, Spire.Doc for Java enhances the conversion from Markdown to Word; Spire.Presentation for Java supports finding the first occurrence of text; Spire.PDF for Java supports converting HTML to PDF using the Chrome plugin; Spire.OCR for Java supports scanning image streams. Moreover, many known bugs are fixed in this update successfully. More details are listed below.
Click the link to download Spire.Office for Java 9.10.0:
Here is a list of changes made in this release
Spire.Doc for Java
Category | ID | Description |
Bug | SPIREDOC-10795 | Fixes issue that the TOC field was updated incorrectly. |
Bug | SPIREDOC-10800 | Fixes the issue that the Chinese characters were garbled after converting Markdown to Word. |
Bug | SPIREDOC-10801 | Fixes the issue that the list numbers were lost after converting Markdown to Word. |
Spire.Presentation for Java
Category | ID | Description |
New feature | SPIREPPT-2573 | Supports the FindFirstTextAsRange method for finding the first occurrence of text.
Presentation ppt = new Presentation(); ppt.loadFromFile(inputFile); String text = "create, read"; PortionEx textRange=ppt.getSlides().get(0).FindFirstTextAsRange(text); textRange.getFill().setFillType(FillFormatType.SOLID); textRange.getFill().getSolidColor().setColor(Color.red); textRange.setFontHeight(28); textRange.setLatinFont(new TextFont("Arial")); textRange.isBold(TriState.TRUE); textRange.isItalic(TriState.TRUE); textRange.setTextUnderlineType(TextUnderlineType.DOUBLE); textRange.setTextStrikethroughType(TextStrikethroughType.SINGLE); ppt.saveToFile(outputFile, FileFormat.PPTX_2016); ppt.dispose(); |
Bug | SPIREPPT-2614 | Fixes the issue that the program threw the NullPointerException exception when loading PPTX documents. |
Bug | SPIREPPT-2616 SPIREPPT-2617 |
Fixes the issue that incorrect content occurred when converting PPTX documents to images. |
Spire.PDF for Java
Category | ID | Description |
New feature | SPIREPDF-7017 | Supports returning error document information when merging documents reports errors. |
New feature | SPIREPDF-7120 | Synchronizes the ToPdfX1A2001() method under the PdfStandardsConverter class to Java. |
New feature | SPIREPDF-6972 | Supports converting HTML to PDF using the Chrome plugin. Supported systems: Windows & Linux.
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath); URI uri = new URI(converter.getUrl()); IWebSocketService webSocketService = (IWebSocketService) WebSocketServiceImpl.create(uri); converter.setWebSocketService(webSocketService); ConvertOptions options = new ConvertOptions(); options.setTimeout(10 * 1000); PageSettings pageSettings = new PageSettings(); pageSettings.setPaperFormat(8);//A4 pageSettings.setMarginBottom(0); pageSettings.setMarginTop(0); pageSettings.setMarginLeft(0); pageSettings.setMarginRight(0); options.setPageSettings(pageSettings); converter.convertToPdf(inputPath, OutputPath, options); |
New feature | SPIREPDF-7094 | Supports output of logs through the Logger class when using the Chrome plugin to convert HTML to PDF.
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath); converter.setLogger(new Logger(OutputPath_TXT)); // Save logs to a txt file converter.getLogger().setEnabled(true); // Print logs to the console |
Bug | SPIREPDF-7029 | Fixes the issue that the red seal became black after encrypting PDF documents. |
Bug | SPIREPDF-7033 | Fixes the issue that the program threw "Unknown Target Area Type: Fit_H" exception when converting PDF to OFD. |
Bug | SPIREPDF-6958 | Fixes the issue that the effect of converting HTML to PDF was incorrect. |
Bug | SPIREPDF-7064 | Fixes the issue that the program threw "Value cannot be null" exception when merging documents. |
Bug | SPIREPDF-7087 | Fixes the issue that it failed to convert HTML to PDF over 1.2MB in size. |
Bug | SPIREPDF-7089 | Fixes the issue that the text of tables was messed up after converting PDF to images. |
Bug | SPIREPDF-7090 | Fixes the issue that the contents were cut off from the page breaks when converting HTML to PDF. |
Bug | SPIREPDF-7091 | Fixes the issue that the program hung when converting HTML to PDF. |
Bug | SPIREPDF-7113 | Fixes the issue that the tool alerted that there were errors in the document content after drawing SVG on PDF layers and opening the resulting document in Adobe tools. |
Bug | SPIREPDF-7127 | Fixes the issue that the program threw an exception of "Unknown Color Space Type" when converting OFD to PDF. |
Bug | SPIREPDF-7128 | Fixes the issue that setting the customized properties of attachments did not take effect. |
Bug | SPIREPDF-7130 | Fixes the issue that the program threw "For input string: 'CM'" exception when converting OFD to PDF. |
Spire.OCR for Java
Category | ID | Description |
New feature | - | Supports a new module for OCR usage.
OcrScanner scanner = new OcrScanner(); //ConfigureOptions configureOptions = new ConfigureOptions("D:\\Models\\java\\Java\\win-x64\\","English"); ConfigureOptions configureOptions = new ConfigureOptions(); configureOptions.setLanguage("English"); configureOptions.setModelPath("D:\\Models\\java\\Java\\win-x64\\"); scanner.ConfigureDependencies(configureOptions); scanner.scan(imageFile); String scannedText=scanner.getText().toString(); System.out.println(scannedText); |
New feature | SPIREOCR-57 SPIREOCR-63 |
Supports scanning image streams.
InputStream stream = new FileInputStream(sourceFolder); scanner.Scan(stream, OCRImageFormat.Gif); |
Bug | SPIREOCR-59 | Fixes the issue that image recognition threw an exception on Ubuntu system. |
Bug | SPIREOCR-76 | Fixes the issue that image data recognition was incorrect. |