function SaveAsObjectStream(Stream: TStream; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown; MaxObjectsPerStream: Integer = 100; MaxDecodedBytesPerStream: Integer = 65536): Boolean;
function SaveAsObjectStream(const FileName: string; Option: TSaveOption = saNone; PdfVersion: TPdfVersion = pvUnknown; MaxObjectsPerStream: Integer = 100; MaxDecodedBytesPerStream: Integer = 65536): Boolean;
| Stream | TStream that receives the complete object-stream PDF |
| FileName | Output path replaced only after a sibling temporary file succeeds |
| Option | Normal save option or saRemoveSecurity; saIncremental is rejected |
| PdfVersion | Output version from PDF 1.5 upward, or pvUnknown to preserve or upgrade the current version |
| MaxObjectsPerStream | Maximum object members per ObjStm group; the default is 100 |
| MaxDecodedBytesPerStream | Maximum decoded member payload per group; the default is 65536 bytes |
True を返しますこのメソッドはまず通常の PDFium 保存パスをセマンティックソースとして使用し、次にアクティブなクラシック、ハイブリッド、xref ストリームのリビジョンを解決します
既存のオブジェクトストリームメンバーは、参照がページローカル順に振り直される前に実体化されます
対象の非ストリームオブジェクトはメンバー数とデコード済みペイロードサイズの両方でグループ化され、圧縮がグループを減らす場合のみ Flate 圧縮されます
カタログ、ストリームオブジェクト、署名辞書、間接ストリーム長、大きすぎる値は直接アドレス可能なままです
純粋な xref ストリームは適応フィールド幅を使用し、すべての圧縮メンバーに type-2 エントリを使います
saIncremental はサポートされず、既存のデジタル署名は無効になりますsaRemoveSecurity が必要です。オブジェクトの振り直しがオブジェクトレベル暗号化キーを変えるためです
// Balance compact output with bounded random-access decompression
Pdf.SaveAsObjectStream('report-compact.pdf', saNoIncremental, pv17, 100, 65536);