property ViewerPreference: Integer; // read only
索引只读属性,返回 /ViewerPreferences 键(NumCopies、PrintScaling 等)的整数值
要求 Active 为 True。当索引超出有效范围时,结果是未定义的;传入 0 .. - 1 范围内的值(对于非计数变体,可使用数组的 Length)
返回的记录是调用时值的快照;之后对文档的编辑不会修改先前返回的记录
var
Items: Integer;
begin
if Pdf1.Active then
begin
Items := Pdf1.ViewerPreference;
Memo1.Lines.Add('count: ' + IntToStr(Length(Items)));
end;
end;