Cells chart saved to PDF adds extra vertical lines

When creating an excel chart then saving to PDF extra vertical lines are added to the right of the chart, yet these line do not exist in the original excel chart.


using total, downloaded and installed on 2015-12-08

see the attached

code to export chart
asposeWorkbook.Worksheets.Add()
asposeWorkbook.Worksheets(1).Name = “Result”
Dim cshape As Aspose.Cells.Drawing.ChartShape = asposeChart.ChartObject
asposeWorkbook.Worksheets(“Result”).Shapes.AddCopy(cshape, 0, 0, 0, 0)
asposeWorkbook.Worksheets(1).PageSetup.TopMargin = 0
asposeWorkbook.Worksheets(1).PageSetup.BottomMargin = 0
asposeWorkbook.Worksheets(1).PageSetup.LeftMargin = 0
asposeWorkbook.Worksheets(1).PageSetup.RightMarginInch = 0 ’ 0.7
asposeWorkbook.Worksheets(1).PageSetup.Orientation = PageOrientationType.Portrait
asposeWorkbook.Worksheets(1).PageSetup.PaperSize = PaperSizeType.PaperLetter
asposeWorkbook.Worksheets(1).PageSetup.FitToPagesWide = False
asposeWorkbook.Worksheets(1).PageSetup.PrintQuality = 600
asposeWorkbook.Worksheets(1).PageSetup.FitToPagesTall = 1
asposeWorkbook.Worksheets(1).PageSetup.FitToPagesWide = 1
asposeWorkbook.Worksheets(0).SetVisible(False, True)
asposeWorkbook.Save(sFilename, Aspose.Cells.SaveFormat.Pdf)

Hi,


Thanks for the template files and sample code.

After an initial test, I observed the issue as you mentioned. I found that the chart (in the template file) when saved to PDF file format by Aspose.Cells adds extra vertical lines as you pointed out. I used the direct Chart.ToPdf() method (new) with our latest version/fix Aspose.Cells for .NET v8.6.2.x but I got the similar chart as per the output PDF file provided by you.
e.g
Sample code:

Workbook workbook = new Workbook(“e:\test2\f2bf8444-3311-4923-8d5a-552c62de990d.xlsx”);
Worksheet sheet = workbook.Worksheets[0];
Chart chart = sheet.Charts[0];
chart.ToPdf(“e:\test2\out1.pdf”);

I have logged a ticket with an id “CELLSNET-44112” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.

Hi,


We have evaluated your issue further.
Well, it is not an issue with the product as it displays the chart fine and in the same way as Ms Excel 2010/2013 does. However I see that Ms Excel 2007 does not display vertical gridlines for the chart though. See the screen shot for your reference (I opened your template file into Ms Excel 2010), so you may see those vertical gridlines there:
http://prntscr.com/9edivs

Let us know if you still have any confusion or issue.

Thank you.