EVO Excel to PDF Library for .NET
=================================

EVO Excel to PDF Library for .NET (Classic) can be used in .NET Framework, .NET Core and .NET Standard applications to convert Excel (.xls and .xlsx) documents to PDF.

The library can also be used to create, edit and merge PDF documents.

You can see the https://www.evopdf.com/evopdf-excel-to-pdf-dotnet product page for a complete list of library features.

This package is compatible with .NET Framework, .NET Core and .NET Standard 2.0 on Windows platforms.

For applications that need to run on both Windows and Linux platforms you can use the EvoPdf.Next.ExcelToPdf package to convert Excel (.xlsx) to PDF.

The full EvoPdf.Next package can be used on Windows, Linux, Azure and Docker platforms to create, edit and merge PDF documents, convert HTML to PDF or images, convert Word, Excel, RTF and Markdown to PDF, extract text and images from PDF documents, search text in PDF documents and convert PDF pages to images.

Main Features
=============

* Convert Excel XLS and XLSX documents to PDF
* Does not require Microsoft Excel or other third party tools
* Convert to a memory buffer, file, stream or PDF object for further processing
* Convert all worksheets or select specific worksheets from a workbook
* Set the PDF page size to a standard or custom size
* Set PDF page orientation and document margins
* Add headers and footers with page numbering to the PDF pages
* Append or prepend external PDF files to the conversion result
* Password protect the PDF document and set permissions
* Add a digital signature to the generated PDF document
* Add graphic elements to the generated PDF document
* Generate PDF/A and PDF/X compliant documents
* Generate CMYK and grayscale PDF documents
* Edit existing PDF documents
* Merge multiple PDF documents into a single PDF document
* Split a PDF document into multiple PDF documents

Compatibility
=============

The compatibility list includes the following .NET versions, platforms and application types:

* .NET Framework 4.0 and above
* .NET 10, 9, 8, 7, 6
* .NET Standard 2.0
* Windows platforms
* Azure Cloud Services and Azure Virtual Machines
* Web, Console and Desktop applications

Getting Started
===============

You can quickly start with the demo applications from the Samples folder of this package or you can integrate the library into your own project.

Reference the Library in .NET Framework Projects
------------------------------------------------

In your .NET Framework project add a reference to the evoexceltopdf.dll assembly from the Lib/net40 folder of this package or to the EvoPdf.ExcelToPdf NuGet package.

Reference the Library in .NET Core Projects
-------------------------------------------

In your .NET Core project add a reference to the EvoPdf.ExcelToPdf NuGet package.

Alternatively you can reference the EvoExcelToPdf_NetCore.dll library directly from the Lib/netstandard2.0 folder of this package, but in this case you also have to manually reference the dependencies of the EvoPdf.ExcelToPdf package for .NET Standard 2.0.

After adding a reference to the library to your project, you are ready to start converting Excel documents to PDF in your .NET application.
You can copy the C# code lines from the section below to create a PDF document from an Excel document and save the resulted PDF to a memory buffer for further processing, to a PDF file or send it to browser for download in ASP.NET applications.

C# Code Samples
---------------

At the top of your C# source file add the 'using EvoExcelToPdf;' statement to make available the EVO Excel to PDF API for your .NET application.

    // add this using statement at the top of your C# file
    using EvoExcelToPdf;

To convert an Excel file to a PDF file you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    ExcelToPdfConverter converter = new ExcelToPdfConverter();
    
    // convert the Excel file to a PDF file
    converter.ConvertExcelFileToFile("my_excel_file_path", "ExcelToFile.pdf");

To convert an Excel file to a PDF document in a memory buffer and then save it to a file you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    ExcelToPdfConverter converter = new ExcelToPdfConverter();
    
    // convert an Excel file to a memory buffer
    byte[] excelToPdfBuffer = converter.ConvertExcelFile("my_excel_file_path");
    
    // write the memory buffer to a PDF file
    System.IO.File.WriteAllBytes("ExcelToMemory.pdf", excelToPdfBuffer);

To convert in your ASP.NET MVC application for .NET Framework an Excel file to a PDF document in a memory buffer and then send it for download to browser you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    ExcelToPdfConverter converter = new ExcelToPdfConverter();
    
    // convert an Excel file to a memory buffer
    byte[] excelToPdfBuffer = converter.ConvertExcelFile("my_excel_file_path");
    
    FileResult fileResult = new FileContentResult(excelToPdfBuffer, "application/pdf");
    fileResult.FileDownloadName = "ExcelToPdf.pdf";
    return fileResult;

To convert in your ASP.NET Web Forms application for .NET Framework an Excel file to a PDF document in a memory buffer and then send it for download to browser you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    ExcelToPdfConverter converter = new ExcelToPdfConverter();
    
    // convert an Excel file to a memory buffer
    byte[] excelToPdfBuffer = converter.ConvertExcelFile("my_excel_file_path");
    
    HttpResponse httpResponse = HttpContext.Current.Response;
    httpResponse.AddHeader("Content-Type", "application/pdf");
    httpResponse.AddHeader("Content-Disposition",
        String.Format("attachment; filename=ExcelToPdf.pdf; size={0}",
        excelToPdfBuffer.Length.ToString()));
    httpResponse.BinaryWrite(excelToPdfBuffer);
    httpResponse.End();

To convert in your ASP.NET Core applications an Excel file to a PDF document in a memory buffer and then send it for download to browser you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    ExcelToPdfConverter converter = new ExcelToPdfConverter();
	
    // convert an Excel file to a memory buffer
    byte[] excelToPdfBuffer = converter.ConvertExcelFile("my_excel_file_path");
	
    FileResult fileResult = new FileContentResult(excelToPdfBuffer, "application/pdf");
    fileResult.FileDownloadName = "ExcelToPdf.pdf";
    return fileResult;

Free Trial
==========

You can download the EVO Excel to PDF Converter for .NET evaluation package from https://www.evopdf.com/download page of the website.

The evaluation package for .NET contains the product binaries and demo web and desktop projects with full C# code for .NET Framework and .NET Core.

You can evaluate the library for free as long as it is needed to ensure that the solution fits your application needs.

Licensing
=========

The EVO PDF Software licenses are perpetual which means they never expire for a version of the product and include free maintenance for the first year. You can find more details about licensing in https://www.evopdf.com/buy page of the website.

Support
=======

For technical and sales questions or for general inquiries about our software and company you can contact us using the email addresses from https://www.evopdf.com/contact page of the website.
