Skip to main content
Any Framework

Syncfusion Excel-to-PDF converter is a .NET library that is used to convert Excel documents into PDF in any ASP.NET MVC application without Microsoft Office dependencies.

Published
Jan 31, 2022
4y ago
Total Downloads
346.2K
346,186

Install

dotnet add package Syncfusion.ExcelToPdfConverter.AspNet.Mvc4 --version 19.4.0.48

No framework information available.

README

A PDF is a fixed document used to display document contents uniformly independent of application software, hardware, and operating system. Syncfusion Essential XlsIO library converts an Excel document to PDF with just five lines of code. You can prepare your document for long-term archiving by converting it to PDF.

Key features

Getting Started

Installation commands

  • Simply run Install-Package Syncfusion.ExcelToPdfConverter.AspNet.Mvc4 from the Package Manager Console in Visual Studio to fetch the NuGet package.
  • If you already have Syncfusion.ExcelToPdfConverter.AspNet.Mvc4 for .NET and want to upgrade the version, please run Update-Package Syncfusion.ExcelToPdfConverter.AspNet.Mvc4 to get the latest version.
  • You can run the following snippets in your environment to see how Syncfusion.ExcelToPdfConverter.AspNet.Mvc4 works.

Convert an Excel workbook to PDF

The following code snippet explains how to convert an Excel document to PDF.

//Initialize ExcelEngine.
using (ExcelEngine excelEngine = new ExcelEngine())
{
    //Initialize IApplication.
    IApplication application = excelEngine.Excel;
	//Set the default version as Xlsx.
    application.DefaultVersion = ExcelVersion.Xlsx;
	//Load an existing workbook into IWorkbook.
    IWorkbook workbook = application.Workbooks.Open(Server.MapPath("App_Data/Sample.xlsx"));
    //Load the Excel workbook to Convert.
    ExcelToPdfConverter converter = new ExcelToPdfConverter(workbook);
    //Initialize PDF document.
    PdfDocument pdfDocument = new PdfDocument();
    //Convert Excel document into PDF document.
    pdfDocument = converter.Convert();
	//Save the PDF document.
    pdfDocument.Save("Output.pdf", HttpContext.ApplicationInstance.Response, HttpReadType.Save);
}

Resources

Support and feedback

License

This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. You can purchase a licnense here or start a free 30-day trial here.

About Syncfusion

Founded in 2001 and headquartered in Research Triangle Park, N.C., Syncfusion has more than 26,000+ customers and more than 1 million users, including large financial institutions, Fortune 500 companies, and global IT consultancies.

Today, we provide 1600+ components and frameworks for web (Blazor, ASP.NET Core, ASP.NET MVC, ASP.NET WebForms, JavaScript, Angular, React, Vue, and Flutter), mobile (Xamarin, Flutter, UWP, and JavaScript), and desktop development (WinForms, WPF, WinUI, Flutter and UWP). We provide ready-to-deploy enterprise software for dashboards, reports, data integration, and big data processing. Many customers have saved millions in licensing fees by deploying our software.

This is a commercial product and requires a paid license for possession or use. Syncfusion’s licensed software, including this component, is subject to the terms and conditions of Syncfusion's EULA. To acquire a license, you can purchase one here or start a free 30-day trial here.


[email protected] | www.syncfusion.com | Toll Free: 1-888-9 DOTNET

Changes from Previous Version

v19.4.0.47v19.4.0.48

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.