I want to create a thumbnail for a word,excel,powerpoint and pdf.
I checked the api and got the options to save them to an image file, I was wondering if I can also provide the width and height of the image to generate.
I am representing Aspose.Slides. I like to share that Aspose.Slides have two separate APIs for PPT and PPTX presentations currently but they are packaged together. The slide thumbnails for both PPT and PPTX slides can be generated. In case of PPT, the Slide.getThumbnail() allows to generate the slide thumbnail based on user defined dimensions and slide scale values. The link share before exhibits all possible types of getThumbnail() options. Please follow this documentation link for code snippet help to generate the slide thumbnails.
In case of PPTX, the only option avaialble for generating the slide thumbanil is based on scale of slide. Please visit this link to see SlideEx.getThumbnail() option in PPTX. There is no direct option to set the custom size for thumbnail in case of PPTX presently as in case of PPT. But there is a work around that can be used for getting the desired size thumbnail of slide in PPTX. The default slide size is 720 x 540. When SlideEx.getThumbnail(1.0f, 1.0f) parameter is used, it will generate the slide thumbnail with size 720 x540. So, if you intend to get the slide thumbnail of size 1200 x 800, you need to perform following small calculation on your end to achieve this.
PresentationEx pres=new PresentationEx("D:\\Aspose Data\\abc.pptx);
for(int i=0;i<pres.getSlides().size ();i++)
ImageIO.write(image,"jpeg", new File("Image_"+i+".jpg"));
Thanks and Regards,
Thank you for your interest in Aspose products. I am representative of Aspose.Words team. Using Aspose.Words, you can create thumbnails of Word document’s pages. Please follow the link for more information:
To zoom the generated images, you can use Scale property:
I’m sorry to inform you that that it is not feasible to specify the size of the converted images when converting PDF to images using Aspose.Pdf.Kit for Java. We have logged a new feature request as PDFKITJAVA-18151 in our issue tracking system to provide support for this feature. You’ll be updated when it is supported in future. We do provide this feature in the .NET version though.
We’re sorry for the inconvenience.
Thank you so much for your quick response.