Charts to PDF rendering problems

Hello,

We are using Aspose Cells API 8.2.x.x. to generate PDF of the charts. For that, we are copying the desired chart to a new sheet and using PDFSaveOptions to generate the PDF of that sheet (by hiding other sheets of the workbook).

I have figured out certain cases wherein charts are not being rendered properly in PDF files.

For your reference I have attached the 2 such excel files containing charts, along with their PDF outputs generated using Aspose API and MS Excel, which are not rendered properly.

In file InvalidPdf.xls - Chart 50, Chart 51 and Chart 52 have following common problems when compared with the PDF of same charts generated using MS Excel:
- Horizontal lines are missing in the Aspose generated PDF
- Thickness of bar lines is decreased in the Apose generated PDF
- Spacing, between the vertical labels to the axis line, is marginally more when compared with MS Excel generated PDF
In file InvalidPdf2.xls - Chart 2 and Chart 8 have following common problem when compared with the PDF of same charts generated using MS Excel:
- Dotted line is missing both in chart and in labels

Following is the code snippet being used to generate PDF files:
Workbook workbook = new Workbook("C:/temp/InvalidPdf2.xlsx");

WorksheetCollection ws = workbook.getWorksheets();
Worksheet sheet1 = ws.get("Charts2");
Chart chart = sheet1.getCharts().get("Chart 8");
ChartShape cshape = chart.getChartObject();
int sheetIndex = ws.add();
Worksheet worksheet = ws.get(sheetIndex);

//Setting the name of the newly added worksheet
String transientSheetName = "TransientWorksheet";
worksheet.setName(transientSheetName);

//Copy the Chart to Second Worksheet
worksheet.getShapes().addCopy(cshape, 0, 0, 0, 0);

//Get the new chart and set its height and width accordingly

Chart chart1 = worksheet.getCharts().get(0);
chart1.getChartObject().setHeight(cshape.getHeight());
chart1.getChartObject().setWidth(cshape.getWidth());
//Making remaining sheets invisible as the output is required for only TransientWorksheet
for (int i = 0; i < ws.getCount(); i++) {
String sheetName = ws.get(i).getName();
if(!transientSheetName.equalsIgnoreCase(sheetName)){
ws.get(i).setVisible(false);
}
}

PdfSaveOptions pdfSaveOptions = new PdfSaveOptions();

pdfSaveOptions.setOnePagePerSheet(true);

worksheet.getPageSetup().setTopMargin(0);
worksheet.getPageSetup().setBottomMargin(0);
worksheet.getPageSetup().setRightMargin(0);
worksheet.getPageSetup().setLeftMargin(0);

workbook.save("c:/temp/Chart 8-Aspose.pdf", pdfSaveOptions);

Thanks,
Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

We were able to observe these issues after converting your source Excel files into PDF using the latest version: Aspose.Cells
for Java v8.2.0.4
. We have tested these issues with the following code. I have also attached the output PDFs for a reference.

The output PDFs contain comments that illustrate these issues.

We have logged these issues in our database for investigation. We will look into them and fix these issues. Once, these issues are resolved or we have some other update for you, we will let you know asap.

These issues have been logged as

  • CELLSJAVA-40993 - Horizontal Gridlines are missing in Growth Chart
  • CELLSJAVA-40994 - Thickness of bar lines of Growth Chart is decreased
  • CELLSJAVA-40995 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Growth Chart
  • CELLSJAVA-40996 - Horizontal Gridlines are missing in Profitability Chart
  • CELLSJAVA-40997 - Thickness of bar lines of Profitability Chart is decreased
  • CELLSJAVA-40998 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Profitability Chart
  • CELLSJAVA-40999 - Horizontal Gridlines are missing in Balance sheet strength Chart
  • CELLSJAVA-41000 - Thickness of bar lines of Balance sheet strength Chart is decreased
  • CELLSJAVA-41001 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Balance sheet strength Chart
  • CELLSJAVA-41002 - Dotted Line is missing in Chart 1
  • CELLSJAVA-41003 - Dotted Line is missing in Chart 2



Java

String filePath = “F:\Shak-Data-RW\Downloads\InvalidPdf2.xlsx”;


Workbook workbook = new Workbook(filePath);

workbook.save(filePath + “.out.pdf”);


Hello,


Is there any update on the above mentioned tickets?

These issues have become critical to our customers who are on their production cycle.

It would be appreciable if a patch build addressing these issues can be provided ASAP.

Thanks,
Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no update for you regarding these issues currently. However, I have logged the comments against these issues and requested the development team to provide some update or ETA regarding them. Once, there is some update or fix for you, we will let you know asap.

Comments have been logged against these issues

  • CELLSJAVA-40993 - Horizontal Gridlines are missing in Growth Chart
  • CELLSJAVA-40994 - Thickness of bar lines of Growth Chart is decreased
  • CELLSJAVA-40995 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Growth Chart
  • CELLSJAVA-40996 - Horizontal Gridlines are missing in Profitability Chart
  • CELLSJAVA-40997 - Thickness of bar lines of Profitability Chart is decreased
  • CELLSJAVA-40998 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Profitability Chart
  • CELLSJAVA-40999 - Horizontal Gridlines are missing in Balance sheet strength Chart
  • CELLSJAVA-41000 - Thickness of bar lines of Balance sheet strength Chart is decreased
  • CELLSJAVA-41001 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Balance sheet strength Chart
  • CELLSJAVA-41002 - Dotted Line is missing in Chart 1
  • CELLSJAVA-41003 - Dotted Line is missing in Chart 2

Hello,

Is there any update on the above mentioned issues? I just wanted to apprise you with the criticality of these issues. Our customers, who have gone live, are asking for immediate fix of these issues and repeatedly asking the status and timelines with regard to these issues. To keep our customers updated, can you please let me know - what is the current state of these issues and till what time we should expect fix for these defects.


Thanks,

Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

We are afraid, your issues are not resolved yet. Please spare us some more time. We have also logged your comment in our database against these issues and requested the development team to provide some ETA or fix. Once, there is some news for you, we will let you know asap.

Comments have been logged against these issues

  • CELLSJAVA-40993 - Horizontal Gridlines are missing in Growth Chart
  • CELLSJAVA-40994 - Thickness of bar lines of Growth Chart is decreased
  • CELLSJAVA-40995 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Growth Chart
  • CELLSJAVA-40996 - Horizontal Gridlines are missing in Profitability Chart
  • CELLSJAVA-40997 - Thickness of bar lines of Profitability Chart is decreased
  • CELLSJAVA-40998 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Profitability Chart
  • CELLSJAVA-40999 - Horizontal Gridlines are missing in Balance sheet strength Chart
  • CELLSJAVA-41000 - Thickness of bar lines of Balance sheet strength Chart is decreased
  • CELLSJAVA-41001 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Balance sheet strength Chart
  • CELLSJAVA-41002 - Dotted Line is missing in Chart 1
  • CELLSJAVA-41003 - Dotted Line is missing in Chart 2


Hi,


Any update on this?

Thanks,
Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

We are afraid, there is no update for you at this moment. However, we have again logged your comments against all of these issues and requested the development team to provide some fix or ETA for these issues. Once, there is some good news for you, we will share it with you asap.

Hi,

Thanks for using Aspose.Cells for Java.

Please download and try this fix: Aspose.Cells for Java v8.2.2.3.

1. Spacing issues: Please try the new fix for spacing between the vertical labels to the axis line is marginally more than Excel. The new fix decreases the spacing. But it still more than in Excel 2010+ version. The InvalidPdf.xls is strange. If you open it with Excel 2003. The spacing is large. For .xls formatted file, we keep to Excel 2003 rule.

2. Dotted line: Now we don’t support dotted line of charts for pdf. Please add pdfSaveOptions.setImageType(ImageFormat.getPng()) to generate pdf with .Png formatted chart image.

3. Bar line: We don’t know how to fix the issues. Please view pdf with 100% scale.

Hello,


Can you please provide with update on these issues?

Thanks,
Neeraj

Hi Neeraj,

Thanks for your posting and using Aspose.Cells.

All of your issues have been marked as Won’t Fix and we have provided you update in this post: 585701.


1. Spacing issues: Please try the new fix for spacing between
the vertical labels to the axis line is marginally more than Excel. The
new fix decreases the spacing. But it still more than in Excel 2010+
version. The InvalidPdf.xls is strange. If you open it with Excel 2003. The spacing is large. For .xls formatted file, we keep to Excel 2003 rule.

2. Dotted line: Now we don’t support dotted line of charts for pdf. Please add pdfSaveOptions.setImageType(ImageFormat.getPng()) to generate pdf with .Png formatted chart image.

3. Bar line: We don’t know how to fix the issues. Please view pdf with 100% scale.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.4.0.2

We have fixed the issue “<span lang=“FR” style=“font-size:11.0pt;font-family:
“Calibri”,“sans-serif”;mso-fareast-font-family:Calibri;mso-fareast-theme-font:
minor-latin;mso-ansi-language:FR;mso-fareast-language:EN-SG;mso-bidi-language:
AR-SA”>CELLSJAVA-40993” now.

Let us know your feedback.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-41002;CELLSJAVA-40993) have been fixed in this update.


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

Hi,

Can you confirm again on the status of following issues. Since we need to give our customer a valid reply for fixing/not fixing their issues, so can you give some reasons for not fixing/fixing foll. issues :
  • CELLSJAVA-40994 - Thickness of bar lines of Growth Chart is decreased
  • CELLSJAVA-40997 - Thickness of bar lines of Profitability Chart is decreased
  • CELLSJAVA-41000 - Thickness of bar lines of Balance sheet strength Chart is decreased

–Jaspreet

Hi,


Well, both “CELLSJAVA-40997” and “CELLSJAVA-41000” issues refer to “CELLSJAVA-40994”, these are identical and have similar nature to “CELLSJAVA-40994” so both issues are considered duplicate.

Regarding the issue logged as "CELLSJAVA-40994 ", we are afraid, our product team could not trace or find the root cause of the issue. When changing the scale of Abode Reader to 100%, the issue disappeared. So, the product team declared it as “Won’t Fix”, we cannot fix the issue for now.

Sorry for any inconvenience caused!

Hi,

Thanks for using Aspose.Cells.

We are working over your following issue which is reopened now

  • CELLSJAVA-40994 - Thickness of bar lines of Growth Chart is decreased

and hopefully we will be able to provide a fix for it in next week.

Hi,

Thanks for using Aspose.Cells.

Please try the new fix for bar border thickness issues i.e CELLSJAVA-40994.

Please download and try the latest fix: Aspose.Cells for Java v8.6.2.1 and let us know your feedback.

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


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

Hello,

As per a separate thread of our issues, you have mentioned that all the issues reported here have been fixed. But the following issues are still not fixed in the latest version of Aspose.Cells. I am currently using Aspose.Cells v17.8.

  • CELLSJAVA-40995 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Growth Chart

  • CELLSJAVA-40998 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Profitability Chart

  • CELLSJAVA-41001 - Spacing between the vertical labels to the axis line is marginally more than Excel inside the Balance sheet strength Chart

PFA the screenshots for these issues. - attachments.zip (172.7 KB)

Can you please analyse these.

Thanks,
Neha

@Neha_Gautam,

As we told you regarding spacing issues:
We might not render the chart images same as MS Excel. The spacing would a bit more than in Excel 2010+ versions. The InvalidPdf.xls is strange. If you open it with Excel 2003. The spacing is large too. For .xls formatted file, we keep to Excel 2003 rule.

Thanks for your understanding!