GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureDocumentConverter Class / EmailPageWidth Property
Example





In This Topic
EmailPageWidth Property (GdPictureDocumentConverter)
In This Topic
Specifies the page width, in points, of the resulting document when converting from the source Email file. The default value is 792.
Syntax
'Declaration
 
Public Property EmailPageWidth As Single
 

Property Value

The default value is 792.
Example
Converting an Email document (.msg and .eml supported) to a PDF document specifying custom properties for the layout of the resulting document.
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);
        }
    }
}
See Also