using (GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter())
{
// Set the text and document properties to be used for the resulting file.
gdpictureDocumentConverter.EmailPageHeight = 612; // A3 page size
gdpictureDocumentConverter.EmailPageWidth = 1191; // A3 page size
gdpictureDocumentConverter.EmailPageMarginTop = 10;
gdpictureDocumentConverter.EmailPageMarginBottom = 10;
gdpictureDocumentConverter.EmailPageMarginLeft = 10;
gdpictureDocumentConverter.EmailPageMarginRight = 10;
using (Stream inputStream = File.Open("input.eml", System.IO.FileMode.Open))
{
using (Stream outputStream = File.Create("output.pdf"))
{
gdpictureDocumentConverter.ConvertToPDF(inputStream, GdPicture14.DocumentFormat.DocumentFormatEmail, outputStream, PdfConformance.PDF1_5);
}
}
}