Hello!
I'm using ExcelToPdfConverter to convert Excel file (with a lot of data) to Pdf. I'm convert it from stream.
Problem is converter pasted whole Excel file onto one page Pdf and it's not readable. After converting I'm printing it.
I tried your's example and it doesn't help me: http://asp.syncfusion.com/demos/web/pdf/exceltopdf.aspx
It's my code:
using (MemoryStream streamToPdf = new MemoryStream())
{
streamToPdf.Write(memArray, 0, memArray.Length);
streamToPdf.Position = 0;
ExcelToPdfConverter converter = new ExcelToPdfConverter(streamToPdf);
PdfDocument pdfDocument = new PdfDocument();
ExcelToPdfConverterSettings settings = new ExcelToPdfConverterSettings();
settings.LayoutOptions = LayoutOptions.FitAllColumnsOnOnePage;
settings.TemplateDocument = pdfDocument;
settings.DisplayGridLines = GridLinesDisplayStyle.Invisible;
pdfDocument = converter.Convert(settings);
string pathtoPdf = HttpContext.Current.Server.MapPath("~/ReportTemplate/Report.pdf");
pdfDocument.Save(pathtoPdf);
return pathtoPdf;
}
Thanks for any help!