Skip to main content

Attachment

Version: 3.0

cete.dynamicpdf.printing.attachment

Attachment​

  • Namespace: ceTe.DynamicPDF.Printing
  • Assemblies: ceTe.DynamicPDF.Printing.40.x64.dll, ceTe.DynamicPDF.Printing.40.x86.dll

Represents a Attachments present in PDFDocument

public class Attachment
Public Class Attachment

Inheritance: Object → Attachment

Licensing​

This class is a DynamicPDF PrintManager feature. The following license is required for non-evaluation usage:

  • DynamicPDF PrintManager for .NET

Examples​

The following examples retrieves the attachment files in the PDFDocument.

Imports System
Imports ceTe.DynamicPDF.Printing

Module MyModule

Sub Main()

' Create an InputPdf object to hold the source PDF
Dim MyInputPdf As InputPdf = New InputPdf("C:\MyDocument.pdf")

' Getting the AttachmentFiles present in PDFDocument
Dim files() As Attachment = MyInputPdf.Attachments

' Create an MyInputPdfFile to hold the AttachmentFiles
Dim MyInputPdfFile As InputPdf

' Checking for AttachmentFiles if any Present if true it gets the Attachment file.
If files.Count() >= 1 Then
MyInputPdfFile = files(0).TryGetPdf()
End If

End Sub
End Module
using System;
using ceTe.DynamicPDF.Printing;

class MyClass
{
static void Main()
{
// Create an InputPdf object to hold the source PDF
InputPdf inputPdf = new InputPdf(@"C:\MyDocument.pdf");

//Getting the AttachmentFiles present in PDFDocument
Attachment[] files = inputPdf.Attachments;

// Create an InputPdfFile object to hold the AttachmentFiles
InputPdf inputPdfFile;

// Checking for AttachmentFiles if any Present if true it gets the Attachment files
if(files.Count() >= 1)
{
inputPdfFile = files[0].TryGetPdf();
}
}

Properties​

FileName​

Gets the Filenames of the Attachment Files present in PDFDocument.

public string FileName { get; }
Public ReadOnly Property FileName As String

Property Value​

String

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

TryGetPdf()​

Gets the Data of the Attachment Files.

public InputPdf TryGetPdf()
Function TryGetPdf() As InputPdf

Returns​

TryGetPdf(String)​

Gets the InputPdf file of the Attachment Files.

public InputPdf TryGetPdf(string password)
Function TryGetPdf(password As String) As InputPdf

Parameters​

The string containing the password.

Returns​

See Also​

ceTe.DynamicPDF.Printing