FPDFDoc_AddAttachment function

  1. @Native<FPDF_ATTACHMENT Function(FPDF_DOCUMENT document, FPDF_WIDESTRING name)>(FPDF_DOCUMENT, FPDF_WIDESTRING)>()
FPDF_ATTACHMENT FPDFDoc_AddAttachment(
  1. FPDF_DOCUMENT document,
  2. FPDF_WIDESTRING name
)

Experimental API. Add an embedded file with |name| in |document|. If |name| is empty, or if |name| is the name of a existing embedded file in |document|, or if |document|'s embedded file name tree is too deep (i.e. |document| has too many embedded files already), then a new attachment will not be added.

document - handle to a document. name - name of the new attachment.

Returns a handle to the new attachment object, or NULL on failure.

Implementation

@ffi.Native<FPDF_ATTACHMENT Function(FPDF_DOCUMENT, FPDF_WIDESTRING)>()
external FPDF_ATTACHMENT FPDFDoc_AddAttachment(
  FPDF_DOCUMENT document,
  FPDF_WIDESTRING name,
);