AddEmbeddedFile
Document properties
Description
Embeds a file into the PDF but does not link it to any part of the document.
The AddFileAttachment function can be used to make the embedded file available as an attachment in the PDF viewer. The PDF viewer must support this functionality (Adobe Reader 7 and later). This process can be done in one step using the EmbedFile function.
The AddLinkToEmbeddedFile function can be used to create a hotspot on a page that links to the embedded file.
Syntax
Delphi
function TPDFlib.AddEmbeddedFile(Const FileName, MIMEType: WideString): Integer;ActiveX
Function PDFlib::AddEmbeddedFile(FileName As String, MIMEType As String) As LongDLL
int DLAddEmbeddedFile(int InstanceID, wchar_t * FileName, wchar_t * MIMEType);Parameters
| FileName | The path and filename of the file to embed into the PDF. |
|---|---|
| MIMEType | The MIME type of the embedded file. For example "image/jpeg" for a JPEG image. |
Return values
| 0 | The file could not be found or there was an error embedding the file into the PDF |
|---|---|
| Non-zero | An EmbeddedFileID that can be used with the AddFileAttachment function |