Problem with charts embedded in a PPTX file when exporting to PDF

Hi, my name is Mark McKenna, working with Teamspace Canada.


We are licensed users of your software, and we’re trying to get a document to render in PDF format for a client of ours. The document is large and contains a variety of content; some of this content is giving us some trouble.

Please find attached a PPTX file with a chart in it; I believe that this was created using Office 2007, but I am not 100% sure. When we use your software (aspose-slides-2.5.0-java) to render this as a PDF, everything on the slide comes through except the pie chart itself, which is blank.

In Office 2010, when we try to edit this chart, we are prompted to ‘convert the chart to the new format’. I did this conversion and tried the export again; this time, the chart still doesn’t show, but a semitransparent pink box is rendered where the chart is in the original document.

Do you have any ideas on how we can proceed?

Thanks for your swift reply,
Mark McKenna

PS: If this problem gets resolved, we have run into a few others as well. One slide throws a Java exception while being exported, I think because there are manual linebreaks in some of the text fields on it; and the entire presentation, at just over 1000 slides, crashes with a NullPointerException after allocating roughly 2 gigs of memory (I ran Java with -Xmx3G; I believe it is a 64 bit Java implementation on a 64 bit platform).

This message was posted using Page2Forum (attachment) from Converting to PDF File - Aspose.Slides for Java

Hi Mark,


I have used Aspose.Slides for Java 2.7.0 and have been able to obtain the chart in generated PDF. Please use the specified version. For your kind reference, I have shared the generated PDF.

Many Thanks,

Hi,


On Tuesday, using the 2.7.0 version of your software, I was able to get charts to appear as you were. However after repackaging the project as a Tomcat library, it stopped working! Now, I am unable to get charts to appear again.

Please find below my testing source code, which as of now is unable to render charts. I’ll also attach an example slide with a chart on it that won’t render (this is not unique; none of the charts in the entire original presentation render as of now).

Dependencies (in order of classpath load):
- mlibwrapper_jai.jar (native portion of JAI Image I/O)
- clibwrapper_jiio.jar (native portion of JAI)
- jai_codec-1.1.3.jar (also tried with jai_codec.jar from the 1_1_2_01 package, and the 1_1_1_01 package of the same name, with the same results)
- jai_core.jar (from the 1_1_2_01 package)
- jai_imageio.jar (from the 1_0_01 package)
- aspose.slides-2.7.0.jar
- jog4j-1.2.16.jar

– CODE BELOW –

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Date;

import com.aspose.slides.License;
import com.aspose.slides.LoadFormat;
import com.aspose.slides.LoadOptions;
import com.aspose.slides.export.PdfCompliance;
import com.aspose.slides.export.PdfOptions;
import com.aspose.slides.export.SaveFormat;
import com.aspose.slides.license.AsposeLicenseException;
import com.aspose.slides.pptx.ImageEx;
import com.aspose.slides.pptx.PresentationEx;

public class AsposePDFConverterLocal {
public static final String LICENSE_FILE = “C:\Users\mmckenna\Downloads\pptx\aspose-slides-2.7.0-java\Aspose.Slides.lic”;
private static final String INFILE = “C:\Users\mmckenna\Downloads\pptx\Chart.pptx”;
private static final String OUTFILE = “C:\Users\mmckenna\Downloads\pptx\Chart.pdf”;
public static void main(String[] args) throws FileNotFoundException, AsposeLicenseException {
FileInputStream fstream = new FileInputStream(LICENSE_FILE);
License license = new License();
license.setLicense(fstream);
System.out.println(“Aspose licensed; server listening.”);

String infile = INFILE;
String outfile = OUTFILE;
System.out.println("Slide conversion for " + infile + " started at " + new Date());
LoadOptions lo = new LoadOptions();
lo.setLoadFormat(LoadFormat.Pptx);
PresentationEx pres = new PresentationEx(infile, lo);

PdfOptions p = new PdfOptions();
p.setJpegQuality(100);
p.setSaveMetafilesAsPng(false);
pres.save(outfile, SaveFormat.PDF, p);
System.out.println("Slide conversion for " + infile + " ended at " + new Date());
}
}

– END CODE –

Hi Mark,


With your comments it seems that when you performed the repackaging of Aspose.Slides for Java as Tomcat library, it failed to work on your end. I will really appreciate if you may please share eclipse project with me where by you have been able to reproduce the issue. I appreciate your cooperation in this regard. Please share the information related to your environment setup as well.

We are sorry for your inconvenience,

Hi Mudassir,


The code I included above reproduces the issue on our end–Tomcat has been excluded from consideration.

I did mistake the actual symptoms though; it turns out that the charts that didn’t work with version 2.5.0 are actually working with 2.7.0; but some charts still fail to render. I’ll attach a new slide for your review that should demonstrate the problem using the above configuration.

Thanks for getting back to me!

Mark

Hi Mark,


I have worked with the presentation file shared by you and have been able to observe the missing chart in exported PDF. An issue with ID 32992 has been created 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 is resolved.

We are sorry for your inconvenience,

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


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