THPDFPage.Height Property

 

THPDFPage.Height

THPDFPage

 

傳回頂部  上一頁  下一頁

Specifies the vertical size of the page.

 

Delphi 語法:

property Height: Single;

 

C++ syntax:

__property float Height;

 

說明

使用 Height property 讀取或變更頁面高度

Height 以點為單位,新值也以點解讀。繪圖座標採 1/THotPDF.Resolution 英吋,所以 Resolution 不是 72 時,請讀取 UserHeight 取得繪圖單位下的頁面高度。設定 Height 會把頁面變成 UserDefined,而 UserDefined 頁面以點為單位繪製

 

頁面是從檔案載入時,設定 Height 會寫入該頁自己的 MediaBox:若某個 MediaBox 與其他頁面共用,或它的數值是獨立物件,會先替此頁換成一份複本,其他頁面與物件因此保有自己的值。對畫布已關閉的頁面設定 Height 會引發 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 );

 

請參閱: UserHeight, Width, Size