Converting to PDF: "Bad State (Oversubscribed Dynamic Bit Lengths Tree)" Exception

Converting specific Powerpoints to PDF fails with Bad state (oversubscribed dynamic bit lengths tree) exception from class

Here is the sample code:

package com.asposeslidestest;

import com.aspose.slides.*;

public class Main {

     * Run as: java -jar build/libs/AsposeSlidesTest-1.0-all.jar test.pptx test.pdf
     * @param args
    public static void main(String[] args) {
        System.out.println("Using Aspose.Slides: " + License.getVersion());
        if(args.length < 2) {
            System.out.println("You must provide input and output document.");
            System.out.println("  java -jar build/libs/AsposeTest-1.0-all.jar encoding.docx encoding.pdf");
        String filename = args[0];
        String outputFilename = args[1];

        try {
            LoadOptions loadOptions = new LoadOptions();

            Presentation doc = new Presentation(filename, loadOptions);

            PdfOptions options = new PdfOptions();
            INotesCommentsLayoutingOptions notesOptions = options.getNotesCommentsLayouting();

  , SaveFormat.Pdf, options);

        }catch(Exception e){

This can only be reproduced when our load options sets keep locked and temporary files allowed, and we ask to convert to PDF with comments displayed. All of these options are required for our application.

And here is a sample presentation that exhibits the problem: (177.9 KB)

I have observed this on every version of Aspose.Slides from 21.3 and onwards (21.3, 21.4, 21.5 and 21.6).


I have created an issue with ID SLIDESJAVA-38571 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as SLIDESJAVA-38571) have been fixed in this update.

Facing same issue with dotnet any update?

#=z1OeLlgQvTTMCskIrSx9tjgk=: 'Bad state (oversubscribed dynamic bit lengths tree)'

Aspose.PDF 23.5.0

Thank you for contacting support.

Please create a new forum thread and share the following files and information:

  • sample presentation file
  • code example that reproduces the exception
  • full stack trace of the error
  • OS version on which the conversion was performed
  • JDK version in your app