Hi,
There is an issue in Aspose Slides when creating donut charts. Steps to reproduce:
-
Create PPT with donut chart as given in the Aspose Dev notes : Doughnut Chart|Aspose.Slides Documentation
-
Edit the donut chart to have only one series with 100% and save it
Open PPT → Edit Data → Remove 3 random entries out of the 4 and save it. -
Read the updated PPT and save it in PDF format.
//Sample code below:
public void generatePptx(String fileName) {
Presentation pres = new Presentation(fileName);
try {
// IChart chart =
// pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Doughnut, 50, 50,
// 400, 400);
// chart.getChartData().getSeriesGroups().get_Item(0).setDoughnutHoleSize((byte)
// 60);
// Write presentation to disk
pres.save("src/main/resources/GENERATED_TEMPLATE.pdf", SaveFormat.Pdf);
} finally {
if (pres != null)
pres.dispose();
}
}
- PDF is not generated properly - left top is cut.
image.png (14.6 KB)