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 that returns the value of a named /ViewerPreferences entry (such as 'NonFullScreenPageMode', 'Direction', or 'ViewArea')

Requires Active to be True; returns an empty string when the key is not present in the catalog

Pass the PDF specification key name (without a 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