AddPageMeasureViewport

頁面屬性、測量和座標單位

描述

依 ISO 32000-1 §12.9 在所選頁面附加直角量測視埠(/VP),帶 /Subtype /RL 量測字典

語法

Delphi

Function AddPageMeasureViewport(Left, Bottom, Right, Top, ScaleRatio: Double; Const UnitLabel, Name: WideString): Integer;

ActiveX

Function PDFlib::AddPageMeasureViewport(Left As Double, Bottom As Double, Width As Double, Height As Double, ScaleRatio As Double, UnitLabel As String, Name As String) As Long

DLL

int DLAddPageMeasureViewport(int InstanceID, double Left, double Bottom, double Width, double Height, double ScaleRatio, const wchar_t* UnitLabel, const wchar_t* Name);
int DLAddPageMeasureViewportA(int InstanceID, double Left, double Bottom, double Width, double Height, double ScaleRatio, const char* UnitLabel, const char* Name);

參數

Left視埠包圍盒的水平座標
Bottom視埠包圍盒的垂直座標
Right視埠包圍盒在 PDF 使用者空間的絕對右側座標;舊版外觀參數名為 Width
Top視埠包圍盒在 PDF 使用者空間的絕對頂部座標;舊版外觀參數名為 Height
ScaleRatio每個 PDF 使用者空間單位對應的世界單位(必須為正)
UnitLabel量測單位標籤(空值時預設 m)
Name選配的視埠名稱,寫入 /Name

傳回值

視埠附加成功時為非零視埠控制代碼,頁面不可用或 ScaleRatio 非正時為 0

備註

DLL 與 ActiveX 的 Width 與 Height 標籤為相容性而保留,但其值是絕對的 Right 與 Top 座標,不是範圍大小;本方法不驗證尺寸

建立帶 /Type /Viewport 的 /BBox 字典,以及 /Measure 的 /Subtype /RL 字典,內含 /R、/X、/D 與 /A 數字格式陣列

自動確保文件版本至少為 PDF 1.6

另請參閱

AddLGIDictToPage, GetMeasureDictCount