function SaveAsRepaired(Stream: TStream; out Report: TPdfRepairReport; AllowSignedDocument: Boolean = False): Boolean;
| Stream | TStream. Destination stream |
| Report | TPdfRepairReport. Receives SourceUsedRecovery, OutputByteCount, OutputPageCount, OutputCrossReferenceTableValid, Succeeded, ErrorMessage, and a Verification load report for the independent re-load |
| AllowSignedDocument | Boolean. Permit rewriting a signed document. Defaults to False |
| Result | Boolean. True when a verified copy was written |
function SaveAsRepaired(const FileName: string; out Report: TPdfRepairReport; AllowSignedDocument: Boolean = False): Boolean;
| FileName | string. Destination file, written atomically through a temporary file in the same directory |
| Report | TPdfRepairReport. Same report record as the stream overload |
| AllowSignedDocument | Boolean. Permit rewriting a signed document |
| Result | Boolean. True when a verified copy was written |
Meant for documents that only opened because recovery rebuilt their cross-reference table. The copy is written as a single clean revision, so the damaged structure is replaced rather than appended to
The output is then loaded again in strict mode by an independent load, and that load report is returned in Verification. A repair that cannot be re-loaded strictly reports failure instead of handing back a file that merely looks written
SourceUsedRecovery records whether the input needed recovery in the first place, which is what LastLoadReport reports after loading