To view EPUB file, we will use GroupDocs.Viewer API which is powerful and easy to start use API for .NET platform. Open NuGet package manager, search for GroupDocs.Viewer and install. In Package Manager Console use following command:
PM> Install-Package GroupDocs.Viewer
GroupDocs.Viewer makes it easy for .NET developers to add EPUB file viewing feature in their applications by implementing a few easy steps.
GroupDocs.Viewer for .NET APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.
// Instantiate viewer
using (Viewer viewer = new Viewer("sample.epub"))
{
// Set view options
ViewOptions viewOptions = new PngViewOptions();
// Convert file to PNG and check the output in the current directory
viewer.View(viewOptions);
}
// Instantiate viewer
using (Viewer viewer = new Viewer("sample.epub"))
{
// Set view options
ViewOptions viewOptions = new PdfViewOptions();
// Convert EPUB to PDF and check the output in the current directory
viewer.View(viewOptions);
}
Multi format documents and images viewer API for .NET. View some of the popular file formats below without any external viewers.
(Microsoft Word Document)
(Microsoft Word Macro-Enabled Document)
(Microsoft Word Open XML Document)
(Microsoft Word Document Template)
(Microsoft Word Macro-Enabled Template)
(Word Open XML Document Template)
(Rich Text File Format)
(Plain Text File Format)
(Microsoft Excel Binary File Format)
(Microsoft Excel Open XML Spreadsheet)
(Microsoft Excel Macro-Enabled Spreadsheet)
(Microsoft Excel Binary Spreadsheet File)
(Microsoft Excel Open XML Template)
(Tab Separated Values File)
(Microsoft Excel Macro-Enabled Add-In)
(Comma Separated Values File)
(PowerPoint Presentation)
(Microsoft PowerPoint Slide Show)
(PowerPoint Open XML Presentation)
(PowerPoint Open XML Slide Show)
(Microsoft PowerPoint Open XML Template)
(Microsoft PowerPoint Template)
(Microsoft PowerPoint Presentation)
(Microsoft PowerPoint Slide Show)
(Adobe Portable Document Format)
(Open XML Paper Specification)
(LaTeX Source Document)
(Open Document Spreadsheet)
(OpenDocument Presentation File Format)
(Origin Graph Template)
(Open Document Text)
(Open Document Template)
(Microsoft Visio 2003-2010 XML Drawing)
(Tagged Image File Format)
(JPEG Image)
(Portable Network Graphic)
(Graphical Interchange Format File)
(Bitmap File Format)
(Microsoft Icon File)
(Adobe Photoshop Document)
(Raster Web Image File Format)
(Scalable Vector Graphics File)
(JPEG 2000 Core Image File)
(Microsoft Project Document)
(Microsoft Project Template)
(Hyper Text Markup Language)
(MIME Encapsulation of Aggregate HTML)
(MIME Encapsulation of Aggregate HTML)
(Microsoft Outlook E-mail Message)
(E-mail Message)
(Microsoft OneNote)
(Windows Metafile)
(Windows Enhanced Metafile)
(Adobe Photoshop Document)
(Microsoft Visio 2003-2010 Drawing)
(Microsoft Visio Drawing)
(Microsoft Visio 2003-2010 Stencil)
(Microsoft Visio 2003-2010 XML Drawing)
(Microsoft Visio 2010 Web Drawing)