Skip to content

Instantly share code, notes, and snippets.

How to Convert EPS to JPG in C#. For more information, please follow link: https://kb.conholdate.com/total/net/how-to-convert-eps-to-jpg-in-csharp
using System;
using GroupDocs.Conversion.Options.Convert;
namespace ConvertEpsToJpgInCSharp
{
class Program
{
public static void Main(string[] args) // Main function to convert EPS to JPG using C#
{
// Remove the watermark in output JPG document by adding license
string licensePath = "GroupDocs.Conversion.lic";
GroupDocs.Conversion.License lic = new GroupDocs.Conversion.License();
lic.SetLicense(licensePath);
// Load the source EPS file for conversion to JPG
var converter = new GroupDocs.Conversion.Converter("sample.eps");
// Set the conversion options for JPG document to customize the output file
ImageConvertOptions options = new ImageConvertOptions();
// Convert and save the EPS in JPG format
converter.Convert("converted.jpg", options);
Console.WriteLine("Done");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment