PDFium Delphi Component Docs

ViewerPreference property

Component: TPdf  ·  Unit: PDFium
Indexed property — returns the string value of a /ViewerPreferences name entry in the document catalog

Syntax

property ViewerPreference[const Key: string]: WString; // read only

Description

Indexed read-only property giving the value of a named /ViewerPreferences entry (such as 'NonFullScreenPageMode', 'Direction' or 'ViewArea')

Needs Active to be True; the result is an empty string when the catalog has no such key

Pass the PDF specification key name (with no leading slash) as Key; the returned WString is decoded from the catalog's /ViewerPreferences dictionary

Remarks

Example

begin
  if Pdf1.Active then
    Memo1.Lines.Add('Direction = ' + Pdf1.ViewerPreference['Direction']);
end;

See Also

PageMode