PDFium Delphi Component Docs

CreateAttachment method

Component: TPdf  ·  Unit: PDFium
Dodaje novu ugrađenu datotku (prilog) na nivou dokumenta

Syntax

function CreateAttachment(const Name: WString; const Data: TBytes; const MimeType: WString = ''): Integer

Description

Dodaje novu ugrađenu datoteku (prilog) na nivou dokumenta

Vraća indeks priloga; koristite AttachmentName/AttachmentType za nabrajanje

Sve izmene trenutne strane se baferuju u PDFium-ovoj reprezentaciji u memoriji. Pozovite UpdatePage da osvežite keš renderovanja i SaveToFile da sačuvate izmene

Remarks

Example

begin
  if Pdf1.Active then
  begin
    Pdf1.MoveTo(100, 100);
    Pdf1.LineTo(200, 150);
    Pdf1.LineTo(200, 200);
    Pdf1.ClosePath;
    Pdf1.AddPath(clRed, 1.5, clYellow, fmWinding);
    Pdf1.UpdatePage;
  end;
end;

See Also

Attachment, AttachmentCount, DeleteAttachment