How to set custom size on Png while conversion of Xps document to Png using Aspose.Page 24.1 version

Hi,
I am unable generate custom-size thumbnail from an Xps file using Aspose.Page 24.1 version.
I tried setting size using ImageDevice as below,

// Create an instance of PNGSaveOptions
com.aspose.xps.XpsDocument document = new com.aspose.xps.XpsDocument(sourceFilePath);
com.aspose.xps.rendering.PngSaveOptions pngSaveOptions = new com.aspose.xps.rendering.PngSaveOptions();
pngSaveOptions.setSmoothingMode(SmoothingMode.HighQuality);
pngSaveOptions.setResolution(300);
 pngSaveOptions.setPageNumbers(new int[] { 1 });
			    
// Create rendering device for XPS format
 ImageDevice device = new ImageDevice();
device.setSize(new Dimension(216, 288));
// Save XPS as PNG
document.save(device, pngSaveOptions);
			    
// Iterate through document partitions (fixed documents, in XPS terms)
for (int i = 0; i < 1; i++) {
	// Iterate through partition pages
	for (int j = 0; j < device.getResult()[i].length; j++) {
		// Initialize image output stream
		FileOutputStream imageStream = new FileOutputStream(outputFilePath);
		 // Write image
		 imageStream.write(device.getResult()[i][j], 0, device.getResult()[i][j].length);
		 // Close the Stream
		 imageStream.close();
	  }
}

However, the dimensions of the generated png do not match to that I have set.

Here is the input .xps file I have used and its output png,
XPS_to_PNG.zip (1.9 MB)

@aakanksha76

We have logged an investigation ticket as PAGEJAVA-279 in our issue tracking system to further check the feasibility. We will let you know as soon as the ticket is resolved. Please spare us some time.

Hello @asad.ali ,

Any update on this ticket?

@aakanksha76

We are afraid that the earlier logged ticket has not been yet resolved. It will be prioritized on a first come first serve basis and as soon as it is resolved, we will update you via this forum thread. Please spare us some time.

We are sorry for the inconvenience.