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)