AddPageLabels
頁面屬性
描述
為所選文件加入一段頁面標籤範圍。文件必須有從第 1 頁開始的範圍,頁面標籤才能正確顯示。頁面標籤是 PDF 1.3 的目錄功能;在較低版本的文件上呼叫此方法時,除非儲存版本已明確鎖定,否則會把有效 PDF 版本提升到 1.3
當已載入的文件將頁面標籤儲存在含子節點的數字樹中時,既有的標籤範圍會被保留;插入或取代的範圍在文件儲存並重新載入後仍然有效
語法
Delphi
Function TPDFlib.AddPageLabels(Start, Style, Offset: Integer; Const Prefix: WideString): Integer;
ActiveX
Function PDFlib::AddPageLabels(Start As Long, Style As Long, Offset As Long, Prefix As String) As Long
DLL
int DLAddPageLabels(int InstanceID, int Start, int Style, int Offset, const wchar_t * Prefix);
參數
| Start | 頁面標籤範圍的起始頁 |
|---|---|
| Style | 0 = 無編號 1 = 阿拉伯數字 2 = 大寫羅馬數字 3 = 小寫羅馬數字 4 = 大寫字母(前 26 頁 A 到 Z,之後 26 頁 AA 到 ZZ,依此類推) 5 = 小寫字母(前 26 頁 a 到 z,之後 26 頁 aa 到 zz,依此類推) |
| Offset | 範圍中第一個頁面標籤的數字部分值。後續標籤會自此值依序編號,此值必須大於等於 1。 |
| Prefix | 此範圍頁面標籤的字首。 |
傳回值
| 0 | Style 參數超出範圍。 |
|---|---|
| 1 | 頁面標籤範圍加入成功。 |