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
public float EmailPageWidth {get; set;}
public read-write property EmailPageWidth: Single; 
public function get,set EmailPageWidth : float
public: __property float get_EmailPageWidth();
public: __property void set_EmailPageWidth( 
   float value
);
public:
property float EmailPageWidth {
   float get();
   void set (    float value);
}

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