C#: Online Guide
How To: excel SDK
Convert Excel to PDF
Convert Excel to PDF
  |  
Home ›› XDoc.Excel ›› C# Excel: Convert Excel to PDF

C# Excel - Convert Excel to PDF in C#.NET


Online C# Tutorial for Converting Excel to PDF (.pdf) Document




Excel to PDF Conversion Overview



RasterEdge Visual C# .NET Excel to PDF converter library control (XDoc.Excel) is a mature and effective Excel document converting utility. Using this Excel to PDF converting library control, .NET developers can quickly convert Excel document to PDF file using Visual C# code. This C#.NET Excel to PDF conversion library can help developers convert multi-page Excel document to multi-page PDF file.


Related .net document control helps:
c# asp.net image viewer: ASP.NET Image Document Viewer Control: view, annotate, redact, convert image files in html web browser
c# asp.net text document viewer: C# HTML5 Viewer: Load, View, Convert, Annotate and Edit OpenOffice, CSV and Text file
c# asp.net document redaction: Redact document ASP.NET: add, delete, apply redaction on PDF files in web browser using C#.net
c# asp.net iis document viewer: C# HTML5 Viewer: Deployment on IIS
asp.net edit pdf text using c#: ASP.NET PDF Text Edit Control: online edit PDF text content using C# ASP.NET
asp.net dotnetnuke pdf editor using c#: ASP.NET DNN PDF Editor Control: view, edit PDF files in Dotnetnuke application
c# asp.net excel document viewer: ASP.NET Excel Document Viewer in C# Control: view office excel files online in ASP.NET web applications


The most outstanding feature of this Excel to PDF converting toolkit is its industry-leading converting accuracy. The PDF file, converted by RasterEdge Excel to PDF converter toolkit, preserves the structure & layout of target Excel document, keeps the elements (like images, tables and chats) of original Excel file and maintains the original text style (including font, size, color, links and boldness).


Why do we need this Excel to PDF converting library? In the daily-life applications, you often need to render and print Excel document content for certain purpose. But without licensed third-party software, you can hardly print the Excel document as the original style. Under this situation, you need to convert Excel document to some image format document.


RasterEdge XDoc.Excel empowers your C#.NET application with advanced Excel to PDF conversion functionality.




C# Demo: Convert Excel to PDF Document



Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.XDoc.Office.Inner.Common.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Office.Inner.Office03.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.XDoc.Excel.dll


  RasterEdge.XImage.Raster.Core.dll


  RasterEdge.XImage.Raster.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.XDoc.PDF.dll


Using namespaces:


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.Excel;


This is a C# programming example for converting Excel to PDF (.pdf) file.




// Load a Excel document.
String inputFilePath = Program.RootPath + "\\" + "1.xlsx";
XLSXDocument doc = new XLSXDocument(inputFilePath);

// Convert and output to a PDF file.
String outputFilePath = inputFilePath + ".pdf";
doc.ConvertToDocument(DocumentType.PDF, outputFilePath);