Free Support Forum - aspose.com

Loss of font fidelity when generating image from PPTX

Hello,

Our customer experiences loss of font fidelity when generating an image of attached pptx file (update: unfortunately your helpdesk tool does not allow me to upload the pptx, how do i pass you the pptx?). This used to work fine with Aspose Slides version 17.12.1, but now they have upgraded to 19.12 this issue comes up. See attached screenshots of outputs of both versions.
Strange thing is that this is only happening in the customer environment (Windows Server 2012 R2 Datacenter) and not in our local copy of the same application running on Windows Server 2016.
Somehow this version of Aspose cannot resolve some fonts?
Is this a known issue? How can it be resolved?

Kind regards,
Herm Flink

Slides 17.12.1 OK.jpg (105.5 KB)
Slides 19.12 Not OK.jpg (87.9 KB)

@hflink01,
Thank you for the issue description.

You can compress the PPTX file to a ZIP archive and upload it. You can also share a link to the PPTX file in Google Drive or Dropbox.

Could you also share a code example reproducing the issue?

Protease product overview.zip (151.6 KB)
The pptx is now attached

This is the code to reproduce (note that, as reported, we cannot reproduce internally, only at customer environment):
public ByteArrayOutputStream[] convertAsPages(InputStream attachment) throws Exception {

	ByteArrayOutputStream[] result = null;
	
	try {
	
		Presentation pres = new Presentation(attachment);	
		
		result = new ByteArrayOutputStream[pres.getSlides().size()];
			
		for(int i=0; i<pres.getSlides().size(); i++) {
			result[i] = this.convert(pres, i);
		}
		
	} finally {
		  
		try {
			attachment.close();
		} catch (IOException e) {
			Logger.getLogger("plugin").warn("Exception closing InputStream: " + e);
		}
		  
	}		
	return result;		
	
}



public ByteArrayOutputStream convert(Presentation pres, int page) throws Exception {
	
	ByteArrayOutputStream out = new ByteArrayOutputStream();
	
	try {
		
		if((page < pres.getSlides().size()) && page >= 0) {
			
		
			ISlide slide = pres.getSlides().get_Item(page);			

			BufferedImage img = slide.getThumbnail(1.5f, 1.5f);

			ImageIO.write(img, "jpg", out);

		} else {
			throw new IllegalArgumentException(EXCEPTION_PAGE_INDEX);
		}

	} finally {
		
		out.close();
		
	}
	
	return out;
}

@hflink01,
Thank you for the presentation sample and code snippet. I reproduced the problem and received similar results. I have logged the issue in our tracking system with ID SLIDESJAVA-38501. Our development team will investigate it. You will be notified when it is fixed.