procedure BeginIncrementalSave(AllowSignedDocument: Boolean = False);
function CommitIncrementalSave(Stream: TStream; out Info: TPdfIncrementalCommitInfo): Boolean;
function CommitIncrementalSave(const FileName: string; out Info: TPdfIncrementalCommitInfo): Boolean;
procedure EndIncrementalSave;
property IncrementalSaveActive: Boolean;
| AllowSignedDocument | Explicitly permits a session on a signed document; the default rejects it |
| Stream | TStream that receives the complete accumulated PDF after this commit |
| FileName | Output path replaced only after a sibling temporary file succeeds |
| Info | Per-commit statistics returned after the destination write succeeds |
| ChangedObjectCount | Number of changed or new indirect objects appended by this commit |
| AppendedByteCount | Bytes appended after the exact previous-output prefix |
| OutputByteCount | Total bytes in the complete output returned by this commit |
| RevisionCount | Number of non-empty revisions committed in the current session |
BeginIncrementalSave は安定した PDFium セマンティックスナップショットを、比較ベースラインと最初の完全出力の両方としてキャプチャします
各コミットは現在の状態をキャプチャし、アクティブなクラシック、ハイブリッド、xref ストリーム、オブジェクトストリームのオブジェクトを解決し、オブジェクト世代と正確な本体バイトを比較します
変更または新しい間接オブジェクトのみが以前の出力の後に書き込まれ、その後、最小限の xref とトレーラーリビジョンが続きます
クラシック xref ソースはクラシック xref テーブルで続き、xref ストリームソースは自己インデックス xref ストリームで続きます
何も変わらない場合、以前の出力がバイト単位で返され、リビジョンは追加されず、RevisionCount も進みません
ファイルオーバーロードは兄弟一時ファイルを書き込み、宛先を原子的に置換し、書き込みや置換が失敗した場合はセッション状態を復元します
AllowSignedDocument が True でない限り拒否されます。明示的な許可は DocMDP や FieldMDP ポリシーを検証しませんEPdfError を発生させますCompressed プロパティから独立しているため、オブジェクト比較は安定したままです
var
Info: TPdfIncrementalCommitInfo;
begin
Pdf.BeginIncrementalSave;
try
Pdf.PageNumber := 1;
Pdf.PageRotation := ro90;
Pdf.CommitIncrementalSave('revision-1.pdf', Info);
Pdf.PageRotation := ro180;
Pdf.CommitIncrementalSave('revision-2.pdf', Info);
finally
Pdf.EndIncrementalSave;
end;
end;