Method ConvertToFile
- Namespace
- LMKit.Document.Conversion
- Assembly
- LM-Kit.NET.dll
ConvertToFile(byte[], string, bool)
Converts an EML file (as a byte array) into a PDF file.
public static void ConvertToFile(byte[] emlData, string outputPath, bool stripQuotes = false)
Parameters
emlDatabyte[]The EML file content as a byte array.
outputPathstringPath where the output PDF will be written.
stripQuotesboolWhen
true, quoted and reply content is removed from the email body.
Exceptions
- ArgumentNullException
Thrown when
emlDataoroutputPathisnull.
ConvertToFile(string, string, bool)
Converts an EML file at the specified path into a PDF file.
public static void ConvertToFile(string inputPath, string outputPath, bool stripQuotes = false)
Parameters
inputPathstringThe file system path to the EML file.
outputPathstringPath where the output PDF will be written.
stripQuotesboolWhen
true, quoted and reply content is removed from the email body.
Examples
using LMKit.Document.Conversion;
EmlToPdf.ConvertToFile("newsletter.eml", "newsletter.pdf");
Exceptions
- ArgumentException
Thrown when
inputPathisnullor whitespace.- ArgumentNullException
Thrown when
outputPathisnull.- FileNotFoundException
Thrown when the specified EML file does not exist.