Maintain chart layout while exporting workbook to PDF using Aspose.Cells for .NET in C#

Good day


Please find attached files showing issue. On PDF export chart’s is distorted and not displaying as in Excel .

Regards

Hi Ian,

Thank you for sharing the sample.

I have evaluated the presented scenario while using the latest version of Aspose.Cells for .NET 17.2.0, and I was not able to see any layout problem in the resultant PDF document. However, I have noticed that one of the charts “10 day tonnes history” is missing completely in the PDF. I have raised this incident as CELLSNET-45147 in our bug tracking system for further investigation. Please spare us little time to properly analyze the case and revert back with updates in this regard. In the meanwhile, please give a try to the latest version (available in Aspose download section) and see if your can find any other issue(s) which I may have missed.

Hi see code below used to export to PDF. Also see attached screen and PDF of result

case SharedItems.reportTypes.AsposeExcel:
Aspose.Cells.Workbook theNewReport = new
Aspose.Cells.Workbook(_AsposeExcel);
theNewReport.Settings.CreateCalcChain = false;
//Calculate the workbook formulas
theNewReport.CalculateFormula();
switch (_ExportTypes)
{
case ExportTypes.MSExcel:
{
theNewReport.Save(location, SaveFormat.Xlsx);
}
break;
case ExportTypes.MSWord:
{
}
break;

case ExportTypes.PDF:
{
theNewReport.Save(location, SaveFormat.Pdf);
}
break;
}

Hi Ian,


Thank you for the code snippet, however, there as some ambiguities that we need to clear.
  • I have noticed that you haven’t given the latest version a try on your end because your recently shared PDF is again generated with Aspose.Cells version 16.11.1.
  • The provided code snippet is not setting the PDF compliance whereas the shared PDF comply with PDF/A standards.
  • The screenshot shared here shows completely different graphs which seem not to be present in the sample spreadsheet shared in this thread.

Could you please give the latest version a try on your end? In case the problem persists, please re-share the input sample spreadsheet and its resultant PDF generated on your side along with a side-to-side comparison while highlighting the problematic areas.

Hi how do I accomplish the following


The provided code snippet is not setting the PDF compliance whereas the shared PDF comply with PDF/A standards

and how do I check what version was used to generate the PDF

I check an d ensured the the latest DLL is in my app folders and generated attached PDF

Sorry I attached the incorrect files. Sorry for that last post has the correct files

Hi Ian,

Thank you for sharing the fresh sample.

I have reevaluated the presented scenario while using the latest version of Aspose.Cells for .NET 17.2.0, and I am able to notice the said problem, that is; charts from the sample loose formatting/layout when spreadsheet renders to PDF format. I have raised this incident with the product team under the ticket CELLSNET-45151. Please spare us little time to properly analyze the scenario and get back with updates in this regard.

C#

var book = new Aspose.Cells.Workbook(dir + “RunRateReport.xlsx”);
book.Settings.CreateCalcChain = false;
book.CalculateFormula();
book.Save(dir + “output.pdf”, SaveFormat.Pdf);

Hi again,

ian@mineware.co.za:
how do I check what version was used to generate the PDF


You can check the “PDF Producer” tag from the PDF document properties in Adobe Acrobat Reader (Ctrl+D). Please check the attached snapshot for your reference.

ian@mineware.co.za:
how do I accomplish the following
The provided code snippet is not setting the PDF compliance whereas the shared PDF comply with PDF/A standards


Please use the PdfSaveOptions.Compliance property as demonstrated ahead.

C#

var book = new Aspose.Cells.Workbook(dir + “RunRateReport.xlsx”);
book.Settings.CreateCalcChain = false;
book.CalculateFormula();
book.Save(dir + “output.pdf”, new PdfSaveOptions() { Compliance = PdfCompliance.PdfA1b});

Thanks


This is an urgent matter on our side as we need to release by 28’th of Feb. So would appreciate if you can have a fix avalibal a.s.a.p

Regards

Hi Ian,


Please note, as we have just logged the problem in our database, therefore it is currently pending for investigation and is in the queue with other priority tasks. We can share the estimated release schedule for the fix once the preliminary analysis is complete. You have to spare us some time for it. In the meanwhile, we will keep you posted with updates in this regard.

I understand.

Good day


Any update regrading this issue?

Hi Ian,


Thank you for writing back. Please note, both of the ticket attached to this thread are currently in analysis phase therefore the product team has not yet shared any updates. We will post our findings as well as ETA for the fix by the end of this week.

Hi Ian,


This is to inform you that both tickets attached to this thread have been marked resolved. We will shortly share the fix here for your testing.
Hi,

Thanks for using Aspose.Cells.
Please download and try the following latest fix: Aspose.Cells for .NET (Latest Version) and let us know your feedback.

Good day


The fix seems to be working fine.

Thanks for the speedy response.

Hi Ian,


Thank you for the confirmation. It is good to know that you are up & running again. Please feel free to contact us back in case you need our further assistance with Aspose APIs.

The issues you have found earlier (filed as CELLSNET-45151;CELLSNET-45147) have been fixed in this update.


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