function SaveAsPdfRToStream(Stream: TStream; const Options: TPdfRSaveOptions): Boolean;
SaveAsPdfRToStream is the streaming counterpart to
SaveAsPdfR — 동일한 출력 바이트를 호출자가 제공한 임의의 seekable TStream에 씁니다. 스캐너 출력을 받아 PDF/R-1 마커를 붙이고 결과를 디스크를 거치지 않고 content store로 보내는 document capture / archival pipeline에 유용합니다
The post-processing is identical to SaveAsPdfR: catalog stripped
to the §6.3 white list, Info dictionary stripped to the §6.4.3
white list, XMP stream carrying the four §6.4.4 Table 1 entries,
%PDF-raster-1.0 footer comment, and trailer /ID. Only
the four allowed Info entries (Creator / Producer / CreationDate /
ModDate) auto-populate from FPDF_GetMetaText; Title /
Author / Subject / Keywords are deliberately NOT bridged because
PDF/R prohibits them in the Info dictionary.
Returns True on success.
SaveAsPdfRToStream은 파일 형식 수준의 마커만 붙이고 허용되지 않는 dictionary 항목을 제거합니다
var
Stream: TMemoryStream;
Opts: TPdfRSaveOptions;
begin
Stream := TMemoryStream.Create;
try
Opts := TPdfRSaveOptions.Default;
Opts.Producer := 'PDFiumPas scan pipeline';
if Pdf1.SaveAsPdfRToStream(Stream, Opts) then
begin
Stream.Position := 0;
ArchiveScan(Stream);
end;
finally
Stream.Free;
end;
end;