Method CreateFileAttachment
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
CreateFileAttachment(string)
Creates attachment from the specified file and returns file specification for the attachment.
public PdfFileSpecification CreateFileAttachment(string filePath)
Parameters
filePath
stringThe name of the file to create attachment from.
Returns
- 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)).
Check the Merge as attachment section to know how to create PDF attachments.
CreateFileAttachment(string, string?)
Creates attachment from the specified file and returns file specification for the attachment.
public PdfFileSpecification CreateFileAttachment(string filePath, string? description)
Parameters
filePath
stringThe name of the file to create attachment from.
description
stringA description for the attachment. Can be
null
.
Returns
- 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)).
Check the Merge as attachment section to know how to create PDF attachments.
CreateFileAttachment(byte[], string)
Creates attachment from provided bytes and returns file specification for the attachment.
public PdfFileSpecification CreateFileAttachment(byte[] buffer, string specification)
Parameters
buffer
byte[]The bytes to create attachment from.
specification
stringThe file specification string.
Returns
- 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.
Check the Merge as attachment section to know how to create PDF attachments.
CreateFileAttachment(byte[], string, string?)
Creates attachment from provided bytes and returns file specification for the attachment.
public PdfFileSpecification CreateFileAttachment(byte[] buffer, string specification, string? description)
Parameters
buffer
byte[]The bytes to create attachment from.
specification
stringThe file specification string.
description
stringA description for the attachment. Can be
null
.
Returns
- 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.
Check the Merge as attachment section to know how to create PDF attachments.
CreateFileAttachment(Stream, string)
Creates attachment from contents of provided stream and returns file specification for the attachment.
public PdfFileSpecification CreateFileAttachment(Stream stream, string specification)
Parameters
stream
StreamThe stream to create attachment from.
specification
stringThe file specification string.
Returns
- 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.
Check the Merge as attachment section to know how to create PDF attachments.
CreateFileAttachment(Stream, string, string?)
Creates attachment from contents of provided stream and returns file specification for the attachment.
public PdfFileSpecification CreateFileAttachment(Stream stream, string specification, string? description)
Parameters
stream
StreamThe stream to create attachment from.
specification
stringThe file specification string.
description
stringA description for the attachment. Can be
null
.
Returns
- 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.
Check the Merge as attachment section to know how to create PDF attachments.