function SaveAsPdfXToStream(Stream: TStream; const Options: TPdfXSaveOptions): Boolean;
SaveAsPdfXToStream is the streaming counterpart to
SaveAsPdfX — same output bytes, written into any
seekable TStream the caller provides. Useful for prepress workflow
integration where PDF/X payloads are pushed straight into print
submission portals, MIS / job-ticketing systems, BLOB columns, ZIP
containers, or HTTP upload pipelines.
İşlem sonrası SaveAsPdfX ile aynıdır: pdfxid tanımlayıcısı ve extension schema açıklamasıyla XMP ekleme, GTS_PDFXVersion / GTS_PDFXConformance / Trapped ile Document Information Dictionary'yi yeniden yazma, /Metadata ve /OutputIntents başvurularıyla katalog güncelleme, /S /GTS_PDFX ve gömülü ICC profile sahip OutputIntent dictionary oluşturma ve bir trailer /ID array üretme. Boş bırakılan Options alanları FPDF_GetMetaText / FPDF_GetFileIdentifier üzerinden otomatik doldurulur
Döndürür: başarı durumunda True. Output stream son yazılan bayttan sonraki konumda bırakılır. Temel SaveAs başarısız olursa ya da post-processing eklenemezse False
Options.IccProfileData + OutputConditionIdentifier değerlerini değiştirinTMemoryStream kullanın; elde edilen baytlar doğrudan bir content store'a ya da print submission API'sine geçirilebilir
var
Stream: TMemoryStream;
Opts: TPdfXSaveOptions;
begin
Stream := TMemoryStream.Create;
try
Opts := TPdfXSaveOptions.Default;
Opts.Conformance := pxc4;
Opts.Title := 'Spring Catalogue 2026';
if Pdf1.SaveAsPdfXToStream(Stream, Opts) then
begin
Stream.Position := 0;
SubmitToPrinter(Stream);
end;
finally
Stream.Free;
end;
end;