[]
Represents the value of the RoleMap entry of the structure tree: a dictionary that maps the names of structure types used in a document to their approximate equivalents in the set of standard structure types. See the PDF specification for details.
Both keys and values are PDF names (plain JS strings).
Obtain it from StructTreeRoot#roleMap.
get count(): number;
Gets the number of entries in the map.
number
get id(): number;
Gets the reference to the object.
number
get om(): ObjectManager;
Gets the owner ObjectManager instance.
clear(): void;
Removes all entries from the map.
void
contains(key): boolean;
Determines whether the map contains the specified key.
string
The structure type name to check.
boolean
true if the key is present, false otherwise.
entries(): [string, string][];
Gets the array of key/value pairs in the map.
[string, string][]
free(): void;
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
get(key): string;
Gets the standard structure type name mapped to the specified key.
string
The structure type name used in the document.
string
The mapped standard structure type name, or undefined if the key is not present.
keys(): string[];
Gets the array of keys (the structure type names used in the document).
string[]
rebind(omTo): void;
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
remove(key): boolean;
Removes the entry with the specified key.
string
The structure type name to remove.
boolean
true if the entry was actually removed, false otherwise.
set(key, value): void;
Maps the specified structure type name to a standard structure type name.
string
The structure type name used in the document.
string
The equivalent standard structure type name.
void