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

EVO Word to PDF Library for .NET (Classic) can be used in .NET Framework, .NET Core and .NET Standard applications to convert Word (.doc, .docx) and RTF 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-word-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.WordToPdf package to convert Word (.docx) to PDF and the EvoPdf.Next.RtfToPdf package to convert RTF 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 Word DOC and DOCX documents to PDF
* Does not require Microsoft Word or other third-party tools
* Convert to a memory buffer, file, stream or a PDF object for further processing
* Convert all pages or select specific pages from the document
* Add headers and footers with page numbering to PDF pages
* Append or prepend external PDF files to the conversion result
* Password-protect PDF documents 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 evowordtopdf.dll assembly from the Lib/net40 folder of this package or to the EvoPdf.WordToPdf NuGet package.

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

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

Alternatively you can reference the EvoWordToPdf_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.WordToPdf package for .NET Standard 2.0.

After adding a reference to the library to your project, you are ready to start converting Word documents to PDF in your .NET application.
You can copy the C# code lines from the section below to create a PDF document from a Word 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 EvoWordToPdf;' statement to make available the EVO Word to PDF API for your .NET application.

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

To convert a Word 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
    WordToPdfConverter converter = new WordToPdfConverter();
    
    // convert the Word file to a PDF file
    converter.ConvertWordFileToFile("my_word_file_path", "WordToFile.pdf");

To convert a Word 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
    WordToPdfConverter converter = new WordToPdfConverter();
    
    // convert a Word file to a memory buffer
    byte[] wordToPdfBuffer = converter.ConvertWordFile("my_word_file_path");
    
    // write the memory buffer to a PDF file
    System.IO.File.WriteAllBytes("WordToMemory.pdf", wordToPdfBuffer);

To convert in your ASP.NET MVC application for .NET Framework a Word 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
    WordToPdfConverter converter = new WordToPdfConverter();
    
    // convert a Word file to a memory buffer
    byte[] wordToPdfBuffer = converter.ConvertWordFile("my_word_file_path");
    
    FileResult fileResult = new FileContentResult(wordToPdfBuffer, "application/pdf");
    fileResult.FileDownloadName = "WordToPdf.pdf";
    return fileResult;

To convert in your ASP.NET Web Forms application for .NET Framework a Word 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
    WordToPdfConverter converter = new WordToPdfConverter();
    
    // convert a Word file to a memory buffer
    byte[] wordToPdfBuffer = converter.ConvertWordFile("my_word_file_path");
    
    HttpResponse httpResponse = HttpContext.Current.Response;
    httpResponse.AddHeader("Content-Type", "application/pdf");
    httpResponse.AddHeader("Content-Disposition",
        String.Format("attachment; filename=WordToPdf.pdf; size={0}",
        wordToPdfBuffer.Length.ToString()));
    httpResponse.BinaryWrite(wordToPdfBuffer);
    httpResponse.End();

To convert in your ASP.NET Core application a Word 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
    WordToPdfConverter converter = new WordToPdfConverter();
	
    // convert a Word file to a memory buffer
    byte[] wordToPdfBuffer = converter.ConvertWordFile("my_word_file_path");
	
    FileResult fileResult = new FileContentResult(wordToPdfBuffer, "application/pdf");
    fileResult.FileDownloadName = "WordToPdf.pdf";
    return fileResult;

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

You can download the EVO Word 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.

