THPDFPage.Height Property

 

THPDFPage.Height

THPDFPage

 

Top  Previous  Next

Specifies the vertical size of the page

 

Delphi syntax:

property Height: Single;

 

C++ syntax:

__property float Height;

 

Description

Use the Height property to read or change the height of the page

Height is measured in points and a fresh value is taken as points too. Drawing coordinates run in 1/THotPDF.Resolution inch, so at any Resolution other than 72 read UserHeight for the page height in the units you draw with. Assigning Height makes the page UserDefined, and a UserDefined page draws in points

 

When the page was loaded from a file, setting Height writes the page's own MediaBox: a MediaBox shared with other pages, or one whose numbers are separate objects, is first replaced by a copy for this page, so other pages and objects keep their values. Setting Height on a page whose canvas has been closed raises EHPDFPageClosedError

Code Example

// Creating multi-size pages in a single PDF document
HPDF.AddPage( A4, poPortrait );
Label1.Caption := 'Page 1 = ' + IntToStr( HPDF.CurrentPage.Width ) + 'x' + IntToStr( HPDF.CurrentPage.Height );

HPDF.AddPage( Letter, poLandscape );
Label2.Caption := 'Page 2 = ' + IntToStr( HPDF.CurrentPage.Width ) + 'x' + IntToStr( HPDF.CurrentPage.Height );

 

See also: UserHeight, Width, Size