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

Share on FacebookTweet about this on TwitterShare on LinkedIn

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

Description

NumeralsArabic

Arab type,for example, 1,1.1,…

NumeralsRomanUppercase

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

NumeralsRomanLowercase

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

LettersUppercase

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

LettersLowercase

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.getPages().add();

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

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

doc.save(“E:/data/Doucment_level_js.pdf”);

 

//Remove Document level JavaScript by key

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

doc1.getJavaScript().remove(“func1”);

System.out.println(“Key ‘func1’ removed “);

doc1.save(“E:/data/Document_level_js_remove.pdf”);

Aspose.Pdf for Java Resources

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