Here is a code which confirms that pdf crashes when trying to add more than 26 heading objects that have same level.
Pdf pdf = new Pdf();
//add a section
Section sec1 = pdf.getSections().add();
for( int i=0 ;i < 27 ; ++i)
Heading heading1 = new Heading(pdf,sec1, 1);
Segment seg = new Segment(heading1 , “”);
pdf.save(new FileOutputStream(new File(“C:/Temp/HeadingLevel.pdf”)));
I have tested the issue and I’m able to reproduce the same problem. I have logged it in our issue tracking system as PDFJAVA-6030. We will investigate this issue in detail and will keep you updated on the status of a correction. We apologize for your inconvenience
Please confirm if this issue shall be solved until the first half of current month.
The current version of product can only 26 Headings in a document. We are working to enlarge this number. But we are not sure we can finish it in the first half of current month.
Thank you for using our product.
The issues you have found earlier (filed as 6030) have been fixed in this update.