PDFium Delphi Component Docs

AddJpegImageDeferred function

Component: TPdfView  ·  Unit: PDFium
TPdfView wrapper that forwards to TPdf.AddJpegImageDeferred, taking viewer client coordinates

Syntax

function AddJpegImageDeferred(JpegImage: TStream; X, Y, Width, Height: Integer; OwnsJpegImage: Boolean = False): Boolean;

Description

Mirrors TPdf.AddJpegImageDeferred. The rectangle is given in viewer client coordinates, with X and Y at the upper-left corner of the placement box as it appears on screen, and is converted to PDF page coordinates before the call reaches the underlying Pdf instance; the displayed page is invalidated on success so the new image shows without a manual refresh

All semantic notes from TPdf.AddJpegImageDeferred apply identically here, including the stream lifetime rule: pass OwnsJpegImage = True to have the component close the stream when the document is unloaded, otherwise the caller must keep it open for as long as the document stays loaded

When TPdfView is bound to an external TPdf (assigning PdfView1.Pdf := Pdf1), reading this member returns the same data as Pdf1.AddJpegImageDeferred without addressing the model component separately

Remarks

Example

if PdfView1.Active then
  Memo1.Lines.Add('AddJpegImageDeferred = ' + BoolToStr(PdfView1.AddJpegImageDeferred(JpegStream, 20, 20, 200, 150, True), True));

See Also

AddJpegImageDeferred, AddJpegImage, Pdf