We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

ExcelToPdf

Thread ID:

Created:

Updated:

Platform:

Replies:

120167 Sep 7,2015 12:05 PM Sep 8,2015 08:04 AM ASP.NET MVC 2
loading
Tags: XlsIO
Artem Shabalinsky
Asked On September 7, 2015 12:05 PM

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!


Artem Shabalinsky
Replied On September 7, 2015 12:30 PM

Hello, Again!
it was my fault!
everything work fine!
Thanks!

Mathu Mohan Vijayakumar [Syncfusion]
Replied On September 8, 2015 08:04 AM

Hi Artem,

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.

Regards,
V.A.Mathu Mohan


CONFIRMATION

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.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;