PdfDocument.CreateFileAttachment Method (Byte[], String, String)

Creates attachment from provided bytes and returns file specification for the attachment.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public PdfFileSpecification CreateFileAttachment(
	byte[] buffer,
	string specification,
	string description
)
VB
Public Function CreateFileAttachment ( 
	buffer As Byte(),
	specification As String,
	description As String
) As PdfFileSpecification

Parameters

buffer
Type: System.Byte[]
The bytes to create attachment from.
specification
Type: System.String
The file specification string.
description
Type: System.String
A description for the attachment. Can be null.

Return Value

Type: PdfFileSpecification
The newly created PdfFileSpecification for the attachment.

Remarks

You can add returned file specifications to collection of document-level attachments (see SharedAttachments) or use it in a file attachment annotation (see AddFileAnnotation(PdfRectangle, PdfFileSpecification)).

The file specification string specified by the specification parameter can not be null. Usually it is the name of a file specification. See Specification for more detail.

See Also