THotPDF.ReadDirectEncryptFromTail Method
Captures the source text of a trailer-inline /Encrypt dictionary from the tail of the input stream
Declaration
function ReadDirectEncryptFromTail: boolean;
Unit
HPDFDoc
Parameters
This member takes no parameters
Return value
True when a direct /Encrypt dictionary was found in the newest trailer of the file tail, otherwise False
Usage notes
- The traditional trailer parser yields the direct /Encrypt dictionary as an object; the key-recovery paths read its source text instead, so this method scans the last 1 MiB of the stream for the newest trailer carrying one
- The stream position is saved and restored around the scan
- Pair the captured text with
InjectDirectEncryptDictionarywhen a later rewrite needs the dictionary as a real indirect object