Incorrect Image Extraction

Hello Aspose team,
I am using the Apose.slides (JAVA) java 1.6.0_65
My company is working on a large project for AOL inc. and they have purchased the enterprise License of Aspose.slides.

We have however hit a road-block with the Aspose software and we need to find an Urgent solution.

We tried exporting slides as thumbnails using the software and got inconsistent results.
Some render correctly (input-1.ppt attached), however others are returning images with overlapping (input-2 attached).
Here is the code that we are using to the extraction part.
--
val thePres=new asposeSlides.PresentationEx(location)
slidePres.write(SAVELOCATION+id.toString+".pptx")
val img=slide.getThumbnail(1F,1F)
ImageIO.write(img,imgExtension,new File("/file_path.png"))
--
This is very urgentCould you please look take a look at this and if it's a bug provide viable workarounds?
thanks,
Jeff

Hi Jeff,


I have worked with the presentation file shared by you using Aspose.Slides for Java 8.2.0 on my end by following code. I have not been able to observe the issue specified on my end. For your kind reference, I have attached the generated thumbnails as well.


public static void genPPTThumbs(String presName,String path ) throws Exception
{
// String path=“D:\Aspose Data\”;
Presentation pres = new Presentation(path+presName);


for(int i=1;i<=pres.getSlides().getLastSlidePosition();i++)
{
Slide sld = pres.getSlideByPosition(i);
try{ BufferedImage image = sld.getThumbnail(2.0f, 2.0f);
ImageIO.write(image,“png”, new File(path+“Slides/PPT_thumbnail” + i + “.png”));
}
catch(Exception e)
{
System.out.println("Exception on slide: "+Integer.toString(i));
// e.printStackTrace();
}
}
}


I have observed that you are using PresentationEx class for PPT. I like to add here that PresentationEx includes limited support for PPT presentation as it is primarily for PPTX presentations. You need to use Presentation class for PPT presentations.

Many Thanks,


Thank you for your response,

I took a look at your documentation and it doesn’t mentioned Java 1.8 as supported.

I am currently running 1.6 which is the list of supported java versions. Could you please verify that you are able to get the correct results using 1.6? I tried using the Presentation class but it didn’t make a difference.

Aspose.Slides for Java supports the following Java versions:

  • J2SE 1.4.x
  • J2SE 5.0 (1.5)
  • J2SE 6.0 (1.6)
  • J2SE 7.0 (1.7)

thanks,
Jeff

Hi Jeff,

I have tried generating the slide thumbnails on my end using Aspose.Slides for Java 8.2.0 in Windows 7 x64 with JDK 1.6_45 and JDK 1.7 on my end. I have not been able to reproduce the issue specified by using following sample code.

public static void genPPTThumbs(String presName,String path ) throws Exception
{
// String path=“D:\Aspose Data\”;
Presentation pres = new Presentation(path+presName);

for(int i=1;i<=pres.getSlides().getLastSlidePosition();i++)

{
Slide sld = pres.getSlideByPosition(i);

BufferedImage image = sld.getThumbnail(2.0f, 2.0f);
ImageIO.write(image,“png”, new File(path+“Slides/”+presName+“Slide” + i + “.png”));

}
}

Can you please share the complete Operating System details available in which you are reproducing the issue.

In response to your question regarding support of Java 1.8, I like to share that it has not yet officially been released and is scheduled for delivery by end of March. Once it will be available, we will perform its trials with Aspose.Slides and update the System Requirements page accordingly.

Many Thanks,

Hi,


Here is the system info:

Java (build 1.6.0_45-b06)
Linux 3.12.9 64 bit Debian 4.4.5-8. Ubuntu 12.04 LTS

Hi Mudassir,


As I understand it, the documentation for Aspose.Slides does indicate that Java 6 and 7 are supported by the API.

Deploying to an unstable Java 8 pre-release is not a workable solution for this project.

We’re currently using the supported Java 6 – please try to duplicate your results on the correct platform and let us know what you’re seeing.

Huge thanks in advance,

Arkady Sokolov
Consumer Analytics & Research, AOL Inc

Hi Arkady Sokolov,


I like to share that I have performed my verification from the shared presentations in Ubuntu 12.0.4 and available Java 1.7 on my end.I have not been able to observe the issue yet on my end. Also the issue does not seem to be with using either JDK 1.6 or 1.7. Can you please share the new output after using the sample code shared by me along with java file with us. It can be an issue with fonts on your end. In this case, I suggest you to please try rendering in Windows environment and generate the thumbnails. If the generated thumbnails are good then please copy the Fonts folder from C:\Windows folder to your Ubuntu installation. Then use the FontsLoader class to load the external fonts directory by giving the link to copied Windows font folder in Ubuntu before executing the code of generating thumbnails.

FontsLoader.loadExternalFonts(new String[]{"//home//WindowsFonts//"});

For your kind reference, the generated images are also attached.

Many Thanks,

Hello Mudassir,


I have tried uploading the fonts like you mentioned. I saw no difference.
Furthermore I also noticed that even the color of some of the rendered image is different than in the presentation. That makes me question whether it’s a matter of font.

Hi Mudassir,


I have attached the sample java file that I’m using to do the parsing.
As I mentioned, even loading the fonts doesn’t help.

Hi Jeff,


We are sorry for your inconvenience as I have not been able to reproduce the issue in my environment. I have created an issue with ID SLIDESJAVA-34241 in our issue tracking system for our development team reference to seek their help in this regard to see whether it is an issue with Aspose.Slides or on your environment end. In the meanwhile, I also suggest you to please try generating the slide thumbnails in some fresh or other Linux installation as well.

I will share the feedback with you as soon as it will be shared by our development team.

Many Thanks,

Mudassir,


We’ve actually tested the build on a mac and two Ubuntu builds – same results on all three machines. Please look out for my email.

Arkady
Consumer Analytics & Research, AOL Inc.

Hi Arkady Sokolov,

We are greatly sorry for your inconvenience.

I
like to share that unfortunately I have not been able to reproduce the
issue on my end. I have used the default Operating System settings on my
end that are used when the Operating System is installed. The things
worked on my end. I have not been able to verify the issue in MAC
environment and will test it in that as well.

I have discussed
this issue with our development team as well and they have assigned it
to concerned resource. I have also raised the priority of the issue to
High so that it may get scheduled with high priority as against the
normal priority level for normal forum support issues. I will share the
feedback with you in this regard as soon as it will be shared by our
development team to help you further.

We are aware about sense of
urgency on your end but will really appreciate your patience till the
time our development team share their feedback for the issue.

Many Thanks,

Hi Arkady Sokolov,

Our development team has performed the investigation on their end and have not been able to reproduce the issue in Ubuntu 12.04. It’s look like fonts problem. For properly rendering attached presentations require Arial fonts.
Can you please try using the shared fonts externally in your application by using the following sample code.

FontsLoader.loadExternalFonts(new String[] { path + “/fonts” });

If there is still an issue by using the attached Fonts then please share thelist of installed fonts in your Ubuntu/MAC installation.

Many Thanks,

Hi Mudassir,


I went ahead and tried using the external font loading code that you recommended.
I didn’t see any changes to the rendered image. I have attached a list of fonts available on my machine as you requested.
Also the FontLoader class doesn’t seem to have any instance/static methods for me to verify whether the font loading happened correctly and it returns a void.


thanks,
Jeff

Hi Jeff,

Thank you for performing the test with shared fonts and sharing your feedback. I have shared the list of fonts installed on your end with our development team to further investigate the issue on their end. Can you please confirm one more thing with us that what path for fonts you are giving in your application and what is the physical path.

For your suggestion regarding list of externally loaded fonts names in FontsLoadedr, I have created an issue with ID SLIDESJAVA-34250 as new feature request to further investigate it on our end.

Many Thanks,

Hi Jeff,

I have shared the installed font information shared by you with our development team and your installation does have the fonts used. Also the fonts shared by used and loading the externally did not work either on your end. The issue is that in your installation the fonts used in presentation are not getting rendered in generated thumbnails. Can you please kindly share the PDF export for both presentation files with us as PDF does have font information internally and it may help us to investigate the issue further. Actually, we are being unable to reproduce your issue in our environment and in order to fix it we need your cooperation in this regard. I really appreciate your efforts and cooperation in terms of following the suggested steps on your end.

Many Thanks,

Mudassir,


I hope this finds you well – we’ve encountered a new Aspose related issue. Simply put, when slides are outputted from our platform all charts contained in them are flattened into an image file. Since the platform is intended to distribute collateral our sales team can adapt to their own powerpoint dicks, this a huge difficulty as there’s no way to edit the images. Please advise if you may have some understanding of what the issue might be – thank you kindly in advance!

Hi Arkady,


I have observed the comments shared by you and it seems that your charts in presentation are having 3-D effects which are missing in generated thumbnails. If this is the case then I like to share that at present the support for 3-D rendering of shapes is unavailable in Aspose.Slides and for this reason you are having the flat charts being rendered in thumbnails. Please share the sample presentation and generated outputs with us in this regard so that I may add a ticket for reference so that we may share the feedback with you once the support will be available.

Secondly, can you please also share the requested feedback for issue SLIDESJAVA-34241 that I have requested in my last post. Please also share if the said issue is resolved on your end so that I may close the ticket on our end.

Many Thanks,

Hi Mudassir,


I think you misunderstood my post. The charts are “flat” when we create them in powerpoint – the issue is that when a slide comes out of aspose, the charts are converted to image files in the slide and can no longer be edited, changed to match the powerpoint file’s theme, etc.

As for SLIDESJAVA-34241, we worked around this issue to a degree but it has not been resolved. As far as we’ve been able to determine this does appear to be a problem with the Aspose API and not the work on our end.

Thank you,

Arkady

Hi Arkady.

I have observed your comments. Do you mean that when you add the chart in presentation using Aspose.Slides they are added as images. I recommend you to please try using Aspose.Slides for Java 8.5.0 on your end. If there is still an issue then I request you to please share the sample code related to generation of charts using Aspose.Slides that have issues. Please also share the generated output presentation and desired output presentation with us. I will be able to investigate the issue further on my end on provision of requested information and help you out.

As far as SLIDESJAVA-34241 is concerned, we will be able to investigate that further on our end after your further feedback in this regard.

Many Thanks,