|120167||Sep 7,2015 04:05 PM UTC||Sep 8,2015 12:04 PM UTC||ASP.NET MVC||2|
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");
Thanks for any help!
We are glad to know that the issue has been resolved at your end. Please let me know if you have any other queries, we will be happy to assist you.
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.