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

Free Support Forum - aspose.com

Lines have different size and position from that in actual chart in Chart's PDF


I am using Aspose.Cells v8.7.0.4 to generate PDF of chart - "WE BDE Dem 2" in the attached excel file. In the PDF output, the position, length and thickness of lines is not same as that in actual chart and all the lines are detached from the chart area. The lines should appear same as they are appearing in actual chart.

Following code is used to generate the output:

void chartToPDF() throws Exception {
Workbook workbook = new Workbook("test.xlsx");
WorksheetCollection ws = workbook.getWorksheets();
String worksheetName = "Sheet1";
Chart chart = ws.get(worksheetName).getCharts().get("WE BDE Dem 2");

I have attached Excel generated Pdf and Aspose generated Pdf along with a screenshot comparing both.

Can you please analyse this issue.


Hi Neha,

Thank you for contacting Aspose support.

Please note that in certain scenarios, Aspose.Cells APIs cannot render the spreadsheets/charts exactly as they are being displayed in Excel application to you. For instance, the information about the data labels & leader lines is not stored in the spreadsheet file therefore Excel application calculates this information at the time of viewing depending on certain factors such as version, scaling and so on. Aspose.Cells APIs also calculates similar information before rendering the charts to images therefore you may get slightly different position/size of data labels/leader lines while using Aspose.Cells for rendering charts. Please find the attachment for a snapshot showing the same chart in Excel 2007 & 2013 with slight difference in leader lines.