Hi,
We have excel template with 2 shhet one is data and another is Graph which is display according to data sheet. We have converted excel to PDF using Aspose.Cells but we can see inconsistency in PDF graph(showing some spike in graph)
Below are the code snippet we have used.
attached details:
DemoTemplate.xlsx – the excel which we are converting to excel
DemoTemplatePdf.pdf – the pdf which is generating using below code
AsposeGraph.PNG – graph spike issue is mentionedGraph Issue.zip (205.2 KB)
class Program
{
static void Main(string[] args)
{
Workbook sourceWorkbook = new Workbook(@“DemoTemplate.xlsx”);
using (var stream = new MemoryStream())
{
sourceWorkbook.Save(stream,
new PdfSaveOptions(SaveFormat.Pdf)
{
OnePagePerSheet = false,
AllColumnsInOnePagePerSheet = false,
Compliance = PdfCompliance.PdfA1b,
CreatedTime = DateTime.Now
});
var data = new byte[stream.Length];
stream.Seek(0L, SeekOrigin.Begin);
stream.Read(data, 0, data.Length);
File.WriteAllBytes(@"DemoTemplatePdf.pdf", data);
}
}
}