Aspose.Pdf for Java 11.1.0 introduces document level JavaScript and different Numbering Styles in Headings

We are pleased to announce new version of Aspose.Pdf for Java. Aspose.Pdf for Java 11.1.0 includes all the features and enhancements introduced in Aspose.Pdf for .NET 11.1.0. Now it supports Roman numbers style for heading in PDF documents and allow to add document level JavaScript.

Along with above stated enhancements this release fixes number of issues reported by our customers in previous release. Some of these are PDF to PDFA, PDF to TIFF, PDF to PNG, HTML to PDF, PDF to HTML and TimeZone issue. Please check release notes of Aspose.Pdf for Java 11.1.0 for complete list.

The following sections describe some details regarding these newly added features/enhancements.

Using Roman numbers in TOC entries

Headings are the important parts of any document. Writers always try to make headings more prominent and meaningful to its readers. If there are more than one headings in a document, a writer has several options to organize these headings. One of the most common approach to organize headings is to write headings in Numbering Style. Aspose.Pdf for Java supports following heading styles. Further details can be found on How to Apply Numbering Style in Heading.


Heading Types



Arab type,for example, 1,1.1,…


Roman upper type, for example, I,I.II, …


Roman lower type, for example, i,i.ii, …


English upper type, for example, A,A.B, …


English lower type, for example, a,a.b, …

Add Document level JavaScript

A new property named JavaScript is added in Document class which has JavaScript collection type and provides access to JAvaScript scenarios by its key.


//Add Document level JavaScript

Document doc = new Document();


doc.getJavaScript().set_Item(“func1″,”function func1() { hello(); }”);

doc.getJavaScript().set_Item(“func2”, “function func2() { hello(); }”);“E:/data/Doucment_level_js.pdf”);


//Remove Document level JavaScript by key

Document doc1 = new Document(“E:/data/Doucment_level_js.pdf”);


System.out.println(“Key ‘func1’ removed “);“E:/data/Document_level_js_remove.pdf”);

Aspose.Pdf for Java Resources

The following resources will help you work with Aspose.Pdf for Java: