Description
Specifies a file to add as attachment of a PDF document.
Applies to
Syntax
long AddFile(string localFilePath)
Return value
Long. Returns 1 if it succeeds and -1 if an error occurs. For the full list of error codes, see Error Codes.
Usage
Call the function to add the files in the specified folder as attachments of the PDF document. The isRecursive argument controls whether to also add the files in the sub folders.
Examples
This example add all the files, including the files in the sub folders, in the "D:\image" folder as attachments to the newly-created PDF document.
lpdf_doc = create PDFdocument lpdf_attach = create PDFattachment lpdf_attach.addfile ( "D:\image\image.png") lpdf_doc.attachment = lpdf_attach
See also