Hi Aspose Slides Team,
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import com.aspose.slides.Presentation;
import com.aspose.slides.SaveFormat;
public class TestColumnChart {
public static void main(String[] args) {
String path = "C:\\Users\\"; //replace the path wrt your machine
Presentation presentation = new Presentation(path + "OriginalFile.pptx");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
presentation.save(baos, SaveFormat.Pptx);
System.out.println(baos);
Presentation tmpPresentation = new Presentation(new ByteArrayInputStream(baos.toByteArray()));
tmpPresentation.save(path + "ByteArrayConvertedFile.pptx", com.aspose.slides.SaveFormat.Pptx);
}
}
With the above Program, we are trying to read an already saved PPT file, save it in ByteArrayOutputStram and saving it again as a pptx file.
Name of the Original file used is “OriginalFile.pptx”
And the PPT looked like →
image.png (55.2 KB)
Name of the File after converting to byte array and saving to a new powerpoint → “ByteArrayConvertedFile.pptx”
And the converted file looks like →
image.png (111.2 KB)
If you closely watch the bar of Product1 got rendered outside plotarea and its not even visible. We see this is happening if we have null values for first one or two entries in series (Here Market1 and Market2 have null values).
We have a requirement to save the file as ByteArray and then reconstruct the file again. And It’s causing issue . Could you please check and update ?
System Configurations:
OS: Windows 10 - 64Bit
CPU & RAM: Intel(R) Core™ i7-10610U & 16GB (JVM Heap Size given is 1GB)
JDK & Aspose.slides: [ Aspose.slides 24.5 with JDK 21 ]
attached the ppt files as zip
PPTFiles.zip (71.8 KB)
Could you help on this issue ?
Thanks,
Thilak