Correct slide size + thumbnails

I have a pptx file that contains a presentation that is 1280px X 720px.

When using the following code I get a size of "960.0 x 540.0".

presentation.getSlideSize().getSize().getWidth() + " X " + pres.getSlideSize().getSize().getHeight()

Why the difference?

Also when I generate a thumbnail using slide.getThumbnail(1,1) it is also 960x540.

How do I generate a full size image?

I’ll add that if I do presentation.save(“presentation.pdf”, SaveFormat.Pdf); the pdf is the proper size of 1280x720.

Hi Brian,

Thank you for considering Aspose.

I tested your reported issue with the latest version of Aspose.Slides for Java and I am unable to reproduce the issue at my end. If you are using some older version, you may download and try the latest version from here and see if it works fine for you. If you still face any issue, please share your input PPTX file and generated thumbnails with us. This will help us in reproducing the issue at our end.

Thanks & Regards,

I am using the most recent version.


What units does the presentation.getSlideSize().getSize().getWidth() method return?
Pixels? Points? Kilometers? Football fields?

Is there somewhere we can access better documentation? The api docs (https://reference.aspose.com/slides/java/com.aspose.slides/SlideSize) don’t provide any help.

Hi Brian,


We are sorry for your inconvenience. I like to share that for PPTX presentation the size of presentations is actually in pixel per inches. There are 576 pixels per inch in case of PPT presentation. For example, if you have a presentation slide with default size 10’’ x 7.5’’ (height x width in inches) then corresponding values for PPT size in term of pixels is 10576 x 7.5576= 5760 x 4320. So, the presentation width and height values that will be returned will be in numbers shared. Now, for PPTX there is scaling factor of 8. i.e 5760 /8 x 4320/8= 720 x 540. The value of width and height that you get using Aspose.Slides is the one that is calculated. So, 10 ‘’ x 7.5 ‘’ (inches in PowerPoint) = 5760 x 4320 (PPT) = 720 x 540 (PPTX). I hope this information will be helpful. Please share, if I may help you further in this regard.

Many Thanks,

Thanks for the explanation. It looks like the values match what powerpoint provides as the points value. So knowing there are 72 points per inch and the typical output resolution is 96 dpi to a monitor (96/72 = 1.33333). If I take the 720x540 and multiply by 1.33333 I get the 960px X 720px dimensions.


Whats puzzling is when I use the slide.getThumbnail(1,1) I get an image that is 720x540 pixels… which doesn’t seem right since its not actually pixels. I need to pass in 1.333 as the scaling factor to get the proper image size.

Hi Brian,

I have observed the requirement shared by you and request you to please visit this documentation link . I hope this will serve the purpose and exactly what you are looking for. Please share, if I may help you further in this regard.

Many Thanks,

Thanks for the link. That helps a lot. As I mentioned, it would be nice if there was this level of documentation in the api itself, or at least a link to this doc page from the api… sure would make finding it easier.

Hi Brian,


Thanks for your feedback. Actually, the requirement shared by you was not directly covered through API properties directly. If it had been covered using API properties directly, it could have been added there. However, the feature required has been calculated based on existing properties indirectly so it has been added in articles rather than API docs. But, surely, I have taken your point and we will try to address is some way in API docs as well.

Many Thanks,

My issue was the getSize() api docs is lacking (READ: provides no value!!) and I had no idea what it was returning.

Take a look at these 2 pages and tell me you which you would rather read?

There should be one place for documentation.

If you really need 2 (you don’t!) then at least link them up to help us find good content.

Hi Brian,


Many thanks for your feedback. I have added some information regarding the missing information in the requested page. Please visit the below link for your kind reference and share if it suffice the needs. You are very right in your point as it will be helpful for others as well.

https://reference.aspose.com/slides/java/com.aspose.slides/SlideSize#getSize–

Many Thanks,

Not even close.

I’ll say again, compare these two and tell me which one is better.

Any api docs page I look at is severely under commented and provides no extra value that the types and names don’t already provide.

Hi Brian,


I am sorry for your inconvenience. The two links that you have shared are different things. One is API docs link that describe that what is returned by the method. The second link is the programmer guide link where the property is used. We will try to improve the API docs with some more information if possible as well to make it more useful. Thanks for your consideration and valuable feedback to us.

Many Thanks,