PDFiumVCL Docs

SaveAsPdfVTToStream method

이 API 항목은 식별자, 시그니처, 코드 블록, PDF 용어를 원래 형태로 유지합니다.
Component: TPdf  ·  Unit: PDFium
In-memory variant of SaveAsPdfVT — writes PDF/VT output into any TStream without staging through disk.

Syntax

function SaveAsPdfVTToStream(Stream: TStream; const Options: TPdfVTSaveOptions): Boolean;

Description

SaveAsPdfVTToStream is the streaming counterpart to SaveAsPdfVT — same output bytes (PDF/X-4 markers plus PDF/VT identification), written into any seekable TStream the caller provides. Useful for variable-data print pipelines where each rendered job is pushed to a digital press or to a billing / transactional document archive without touching disk.

The post-processing is identical to SaveAsPdfVT: a five-object injection (XMP stream + ICC stream + OutputIntent dict + rewritten Info dict + rewritten Catalog dict) plus a trailer with /ID. Options fields left empty are auto-populated from FPDF_GetMetaText / FPDF_GetFileIdentifier.

Returns True on success.

Remarks

Example

var
  Stream: TMemoryStream;
  Opts: TPdfVTSaveOptions;
begin
  Stream := TMemoryStream.Create;
  try
    Opts := TPdfVTSaveOptions.Default;
    Opts.Producer := 'PDFiumVCL VT pipeline';
    if Pdf1.SaveAsPdfVTToStream(Stream, Opts) then
    begin
      Stream.Position := 0;
      PushToPress(Stream);
    end;
  finally
    Stream.Free;
  end;
end;

See Also

SaveAsPdfVT, ValidatePdfVT, PdfVTConformance, SaveAs