PDFium Delphi Component Docs

AddJpegImageFile function

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

Syntax

function AddJpegImageFile(const FileName: string; X, Y, Width, Height: Integer): Boolean;

Description

Mirrors TPdf.AddJpegImageFile. 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 the semantic notes from TPdf.AddJpegImageFile apply here unchanged. In particular the JPEG file stays open, and locked against replacement, until the document is unloaded, because the image is read from disk again at render and save time rather than copied into the document at insert time

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

Remarks

Example

if PdfView1.Active then
  Memo1.Lines.Add('AddJpegImageFile = ' + BoolToStr(PdfView1.AddJpegImageFile('C:\Images\photo.jpg', 20, 20, 200, 150), True));

See Also

AddJpegImageFile, AddJpegImage, Pdf