PDFium Delphi Component Docs

InspectOptionalContent method

Component: TPdf  ·  Unit: PDFium
Builds a typed inventory of the document optional-content model and computes effective visibility for one usage and configuration

Syntax

function InspectOptionalContent(out Inventory: TPdfOptionalContentInventory;
  Usage: TPdfOptionalContentUsage = ocuView;
  ConfigurationIndex: Integer = -1): Boolean;

Description

The method asks PDFium to save the current in-memory document state, then reads the resulting active object graph without depending on private renderer exports

Groups contains object identities, names, Intent values, View/Print/Export states, language and preferred-language metadata, page-element subtype, zoom range, lock state, radio-group membership, and effective visibility

Configurations contains the default configuration followed by alternate configurations, including names, creators, Intent values, /BaseState, /ON, /OFF, /Locked, flattened /Order, /RBGroups, and automatic-state presence

Memberships reports indirect OCMD dictionaries, member groups, policy, original /VE expression text, and the evaluated result with recursion bounded at 32 levels

Parameters

Remarks

Example

var
  Inventory: TPdfOptionalContentInventory;
begin
  if Pdf1.InspectOptionalContent(Inventory, ocuView) then
    Caption := Inventory.Groups[0].Name;
end;

See Also

SaveAsOptionalContentConfigured, RenderPageByIndex, SaveAs