We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Conversion of pptx with text doesn't generate faithful images

We have bought Aspose license to mainly convert various documents into series of images. One among them being PPTx. We use slides for Java - latest version 7.2



We tried to convert the PPTx pages to images using

BufferedImage image = SlideEx.getThumbnail();


as well as to SVG using


SlideEx.writeAsSvg(svgOutputStream);



As you can from my attachments (png and svg output for page 2 and 3), both type of conversion resulted into troublesome output for source pptx (also attached)
In both cases the right hand side of text is getting lost.
Moreover, in case of page 3, the letters are overriding each other resulting an unpleasant reproduction.


I was wondering what can we do (if anything) to improve the quality of the image so they are more faithful to source file.

Thank you

Hi Prashant,


I have worked with the presentation file shared by you and have been able to generate the the thumbnail and SVG image without any issue using Aspose.Slides for Java 7.2.0. I have used the following sample code and have attached the generated images for your reference. I suggest that you may please use the shared display setting on your end as this can be one of reason.

Many Thanks,

Hi,

You mentioned that you have shared the code with me. But I don’t see in the thread.


Can you please resend the code that worked for you. That will help us a bunch

Thank you in advance

Hi Prashant,


Please accept my apologies for missing the code. I have used following sample code.

public static void QumuThumbnail(String path,String name) throws Exception
{
PresentationEx pres = new PresentationEx(path + name + “.pptx”);

int j = 1;
for (int i = 0; i < pres.getSlides().getCount(); i++)
{
SlideEx sld = pres.getSlides().get_Item(i);
BufferedImage image = sld.getThumbnail(2.0f, 2.0f);

File outputFile = new File(path + “Slides/Slide_” + j + “.svg”);
FileOutputStream fos = new FileOutputStream(outputFile);
//Saving the thumbnail image in jpeg format
ImageIO.write(image,“jpeg”,new File(path + “Slides/Slide_” + j + “.jpeg”));
sld.writeAsSvg(fos);
fos.close();
j++;
}
}

Many Thanks,

Hi there

I copied your code verbatim on new project that uses Aspose.Slides for Java 7.2.0 (which I downloaded again) and ran on my machine and still I got the bad results (not the ones you saw). So I am wondering why?

1) Are you sure you using Aspose.Slide For Java 7.2.0 available for download and not some beta or intermediate development version?

2) I see there are two copies of Aspose.Slide - ‘aspose.slides-7.2.0-jdk14.jar’ and ‘aspose.slides-7.2.0.jar’. Which one are you using? Because I am using ‘aspose.slides-7.2.0.jar’ with JRE 1.6

3) You also mentioned about shared display setting above and gave an example of configuring that on Windows. That’s only for display and should not affect rendering of the image at all. Am I right? Because I am developing code on Mac and our servers are Linux where it finally gets deployed and run.

By the way, thank you for quick feedback.
We really appreciate that


Hi Prashant,


Yes, I have used Aspose.Slides for Java 7.2.0 on my end and there is no intermediate or beta version for that. You are using the correct jar file as aspose.slides-7.2.0-jdk14.jar is supported for JDK 1.4 and 1.5 only. For Java 1.6 and above you need to use aspose.slides-7.2.0-.jar. I have carried my testing in Windows environment and you seem to have used MAC and Linux. Please use the version of MAC on which you have tested your application. I will add the ticket in our issue tracking system for that.

Many Thanks,

I tried (compiled and ran) exact same code on windows and the images turned out to be fine.

So I confirm that problem is specific to Mac.

In development environment, we compile and run on Mac, which produces bad images.
For production environment, we compile on mac but run on linux, which also produces bad images

Hi Prashant,


I have created an issue with ID SLIDESJAVA-33830 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-33830) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan