We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PPTX to PNG - text is appearing as garbage characters Open JDK 11

We are using Aspose.Slides v19.x to generate PNG of PPT slides. The text content of PPT is appearing as garbage characters.
This happens only with the newest Open JDK 11.0.5. Java 8 and Java 11.04 is ok.

public class Main {

    public static void preview( File source ) throws IOException {

        try ( InputStream is = new FileInputStream( source )) {

            Presentation doc = new Presentation( is );

            try {
                ISlideCollection slides = doc.getSlides();

                for ( int i = 0; i < slides.size(); i++ ) {
                    ISlide sld = slides.get_Item( i );
                    BufferedImage image = sld.getThumbnail( 1.0f, 1.0f );

                    String name = source.getName() + "-page-" + ( i + 1 ) + ".png";
                    FileOutputStream fos = new FileOutputStream( new File( name ) );
                    ImageIO.write( image, "PNG", fos );
                    fos.close();
                }
                return;

            } finally {
                doc.dispose();
            }
        }
    }

    public static void main( String[] args ) throws Exception {
        if ( args.length != 1 ) {
            System.out.println( "usage: programm input output" );
            System.exit( 1 );
        }
        preview( new File( args[0] ) );
    }
}

PWTW41DM.zip (594.8 KB)bad.png (66.4 KB)
good.png (98.7 KB)

@depi,

I have observed the issue shared by you. An issue with ID SLIDESJAVA-37995 has been created 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-37995) have been fixed in this update.