Reference Guide
GdPicture14 Namespace / GdPictureDocumentConverter Class / HtmlPageHeight Property
Example





In This Topic
    HtmlPageHeight Property (GdPictureDocumentConverter)
    In This Topic
    Specifies the page height, in points, of the resulting document when converting from the source html file. Default value is 1080.
    Syntax
    'Declaration
     
    
    Public Property HtmlPageHeight As Single
    public float HtmlPageHeight {get; set;}
    public read-write property HtmlPageHeight: Single; 
    public function get,set HtmlPageHeight : float
    public: __property float get_HtmlPageHeight();
    public: __property void set_HtmlPageHeight( 
       float value
    );
    public:
    property float HtmlPageHeight {
       float get();
       void set (    float value);
    }

    Property Value

    The default value is 1080.
    Example
    Converting an HTML page 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.HtmlPageHeight = 842; // A3 page size
        gdpictureDocumentConverter.HtmlPageWidth = 1191;  // A3 page size
        gdpictureDocumentConverter.HtmlPageMarginTop = 10;
        gdpictureDocumentConverter.HtmlPageMarginBottom = 10;
        gdpictureDocumentConverter.HtmlPageMarginLeft = 10;
        gdpictureDocumentConverter.HtmlPageMarginRight = 10;
     
        using (Stream inputStream = File.Open("input.html", System.IO.FileMode.Open))
        {
            using (Stream outputStream = File.Create("output.pdf"))
            {
                gdpictureDocumentConverter.ConvertToPDF(inputStream, GdPicture14.DocumentFormat.DocumentFormatHTML, outputStream, PdfConformance.PDF1_5);
            }
        }
    }
    See Also