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





In This Topic
EmailPageHeight Property (GdPictureDocumentConverter)
In This Topic
Specifies the page height, in points, of the resulting document when converting from the source Email file. Default value is 1080.
Syntax
'Declaration
 
Public Property EmailPageHeight As Single
 

Property Value

The default value is 1080.
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