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

Free Support Forum - aspose.com

Export to PDF - Chart Issue

Hi,

I'm having some problems saving a worskheet with a chart in it as pdf.

The chart in the pdf file generated by aspose looks different than the print preview and the pdf file generated by excel (save as pdf).

The chart is bigger and there is a border around the category labels.

I'm attaching my sample files: the excel workbook, the pdf file generated by aspose and the pdf file generated by excel.

The pdf file was generated with the following code:<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

C#

string filePath =
“mypath”;

Workbook workbook =
new
Workbook(filePath);

workbook.Save(filePath + “.
out.pdf”,
SaveFormat.Pdf);<o:p></o:p>

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have found this issue with the latest version: Aspose.Cells
for .NET v7.3.5.1
with your given code.

We have logged it in our database with the issue id: CELLSNET-41319.

Once the issue is fixed or we have some other update for you, we will let you know asap.

Hi,

Any news on this issue?

I'm sending some other files to illustrate the problems that I'm having when exporting workbooks with charts to PDF using Aspose. (the excel workbook, the pdf file generated by Aspose and the pdf file generated by excel).

It is a simple column chart, with two columns. In the pdf file generateb by aspose the columns become so big that they don't even fit the page.

The code used to generate the pdf file is the same one mentioned above.

Thank you.

Hi,


Thanks for providing us another set of files.

We did notice the chart’s sizing issue for the new template file as well. I have logged it as well against your existing issue “CELLSNET-41319”. We will look into it soon.

Thank you.

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

We have fixed this issue.

Please download and try this fix: Aspose.Cells for .NET v7.4.0.1 and let us know your feedback.

Hi,

Thanks a lot for your reply and for the fix.

I did some tests with this new version you provided, and the charts in the pdf file are looking a lot better now.

But there is still one detail that is not right: the labels from the X axis of the charts.

In some cases there is a border around the labels, in other cases the labels look different from the source workbook.

I'm sending some source files to show these differences: the excel workbook, the pdf file generated by aspose and the pdf file generated by excel.

The code used to generate the pdf file is the same one mentioned above.


Thanks again for your help.

Hi,

Thanks for your feedback and using Aspose.Cells.

We are glad to know some of your issues have been fixed. For other issues, we will look into them and provide you a fix asap.

We have also logged your comments against this issue: CELLSNET-41319.

Once, we will have some update for you, we will let you know.

Hi,


Please try the new fix/version: Aspose.Cells for .NET v7.4.0.2.

Your issue is fixed in it.



Thank you

Hi Amjad,

Thanks a lot for your support and for the fix.

I tested the new version, and the charts are looking a lot better now.

Most of my charts in the pdf files are looking just like the excel workbook, but there are still some cases that are showing some issues.

The excel workbook tilts the chart labels so that they can fit the chart, but that doesn't happen on the chart generated by aspose cells on the pdf. Also, when there are negative numbers the axis look a little different.

I'm sending some sample files to show the problems: the excel workbook, the pdf generated by aspose and the pdf generated by excel. The code used is the same one mentioned above.

Thank you again for your help.

Hi,


Well, I tested your issue with your newly attached template file. I think it almost works fine as per your original chart. The labels (category axis) are rendered fine with proper angle. The value axis are correct although the difference (the interval unit is not exactly the same). Since your chart has minimal height/widths, so it might not be possible to mimic exactly the similar results. You may extend the height and width of the chart to mimic the same results.

I have attached the output PDF generated on my end with v7.4.0.2 for your reference.

Thank you.

Hi Amjad,

Thank you for your quick reply.

I had noticed before before that if I reduce the size of the chart the pdf is rendered like excel.

The only problem was that the chart in my report had the exact size where aspose cells show a different result from excel, and the labels are not completely visible. (ex: "mar-12" was displayed as "mar-1")

But I was able to change the report and reduce the size of the charts, so I guess my problem is now solved.

My biggest concern now is on this other topic: http://www.aspose.com/community/forums/442429/problem-with-chart-layout-when-exporting-to-pdf/showthread.aspx#442429

Thanks a lot for your help.

Hi,


Good to know that your have sorted out your issue a bit.

For your other issue “CELLSNET-41324” posted into other thread, please follow up in your other thread.

Thank you.