We are excited to announce the release of Spire.Office for java 9.5.0. In this version, Spire.PDF for Java retrieving JavaScript content from PDF documents; Spire.Doc for java supports ignoring comparing headers and footers when comparing PDF documents; Spire.XLS for Java enhances the conversion from Excel to PDF. Besides, a lot of known issues are fixed successfully in this version. More details are listed below.
Click the link to download Spire.Office for Java 9.5.0:
Here is a list of changes made in this release
Spire.PDF for Java
| Category | ID | Description |
| New feature | SPIREPDF-6644 | Adds a constructor method "PdfInkAnnotation ink = new PdfInkAnnotation(Rectangle2D rect, List<int[]> inkList)" to address the issue of PdfInkAnnotation not displaying in the browser.
PdfDocument doc = new PdfDocument();
PdfPageBase pdfPage = doc.getPages().add();
ArrayList inkList = new ArrayList();
int[] intPoints = new int[]
{
100,800,
200,800,
200,700
};
inkList.add(intPoints);
Rectangle2D rect = new Rectangle2D.Float();
rect.setFrame(new Point2D.Float(0, 0), new Dimension((int)pdfPage.getActualSize().getWidth(), (int)pdfPage.getActualSize().getHeight()));
PdfInkAnnotation ink= new PdfInkAnnotation(rect,inkList);
ink.setColor(new PdfRGBColor(Color.RED));
ink.getBorder().setWidth(12);
ink.setText("e-iceblue");
pdfPage.getAnnotations().add(ink);
doc.saveToFile("inkAnnotation.pdf");
|
| New feature | SPIREPDF-6672 | Supports retrieving Javascript content from PDF documents.
PdfPageBase page = pdf.getPages().get(0);
StringBuilder stringBuilder = new StringBuilder();
java.util.List<PdfJavaScriptAction> list = pdf.getNames().getJavaScripts();
stringBuilder.append(list.get(2).getScript()+"\r\n");
list.get(0).setScript("new javaScript code");
PdfAnnotationCollection annotationCollection = page.getAnnotations();
for(int i = 0;i < annotationCollection.getCount();i++){
PdfLinkAnnotationWidget annotation = (PdfLinkAnnotationWidget) annotationCollection.get(i);
stringBuilder.append("Method name:"+"\r\n");
String script = ((PdfJavaScriptAction) annotation.getAction()).getScript();
stringBuilder.append(script+"\r\n");
}
|
| Bug | SPIREPDF-6662 SPIREPDF-6667 |
Fixes the issue that the text in tables was not being extracted completely. |
| Bug | SPIREPDF-6675 | Fixes the issue that the application threw a "java.lang.NullPointerException" exception when saving a PDF document after flattening form fields. |
Spire.Doc for Java
| Category | ID | Description |
| New feature | SPIREDOC-10156 | Supports ignoring headers and footers when comparing PDF documents.
CompareOptions options=new CompareOptions(); Options.IgnoreHeadersAndFooters=true;//Default is false |
| Bug | SPIREDOC-9330 SPIREDOC-10446 |
Fixes the issue that the text was garbled after converting a DOCX document to a PDF document. |
| Bug | SPIREDOC-9309 | Fixes the issue that the content was messed up after converting a DOCX document to a PDF document. |
| Bug | SPIREDOC-9349 | Fixes the issue that the content appeared different when it was opened with WPS tool after loading and saving the document. |
| Bug | SPIREDOC-10137 | Fix the issue that the text direction of the vertical text box was incorrect after converting a Word document to a PDF document. |
| Bug | SPIREDOC-10373 | Fix the issue that the program threw "cannot be cast to java.lang.Float" exception when comparing Word documents. |
| Bug | SPIREDOC-10383 | Fixed the issue that the paragraph alignment was incorrect after converting HTML to Word documents. |
| Bug | SPIREDOC-10408 | Fixed the issue that the program threw "Specified argument was out of the range of valid values" exception when loading Word documents. |
| Bug | SPIREDOC-10455 | Fix the issue that paging was incorrect after converting Word documents to PDF documents using WPS rules. |
| Bug | SPIREDOC-10459 | Fixed the issue that images were rotated after converting Word documents to PDF documents. |
| Bug | SPIREDOC-10466 | Fix the issue that extra content appeared after converting Word documents to PDF documents. |
| Bug | SPIREDOC-10481 | Fix the problem that the program threw a "NullPointerException" when converting Word documents to PDF documents. |
| Bug | SPIREDOC-10485 | Fix the issue that extra blank pages appeared after converting Word documents to PDF documents using WPS rules. |
| Bug | SPIREDOC-10513 | Fix the issue that the content of the drop-down box was garbled after converting a Word document to a PDF document. |
Spire.XLS for Java
| Category | ID | Description |
| Bug | SPIREXLS-5215 | Fixes the issue that the program threw "NullPointerException" when converting an Excel document to an HTML document. |
| Bug | SPIREXLS-5219 | Fixes the issue that the content of charts was incorrect after converting them to pictures. |
| Bug | SPIREXLS-5221 | Fixes the issue that the program threw "NullPointerException" exception when calling calculateAllValue() method to calculate formulas and convert Excel documents to pictures. |
| Bug | SPIREXLS-5222 | Fixes the issue that the chart content was incorrect after converting an Excel document to a PDF document. |
| Bug | SPIREXLS-5224 | Fixes an issue that the chart style was incorrect after loading and saving an XLSM document. |
| Bug | SPIREXLS-5230 | Fixes the issue that the XLOOKUP formula was calculated incorrectly. |
Spire.Presentation for Java
| Category | ID | Description |
| Bug | SPIREPPT-2466 | Optimizes the time consumption for converting PPTX to PDF. |
| Bug | SPIREPPT-2471 | Fixes the issue that the comments were incorrect after merging multiple PPTX files. |
| Bug | SPIREPPT-2486 | Fixed the issue that the application threw the "StringIndexOutOfBoundsException" when converting PowerPoint to HTML. |
| Bug | SPIREPPT-2504 | Fixes the issue that charts were blurred after converting PowerPoint to images. |