Attachment

Represents Attachments present in PDFDocument

public class Attachment
Public Class Attachment

Inheritance: ObjectAttachment

Licensing Info

This class is a DynamicPDF Rasterizer feature. One of the following is required for non-evaluation usage:

Examples

The following examples retrieves the attachment files in the PDFDocument and rasterizes the attachment PDF.

Imports System
Imports ceTe.DynamicPDF.Rasterizer

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 
       
        ' Gets the InputPdf file present in AttachmentFiles
        Dim MyInputPdfFile As InputPdf =  files(0).TryGetPDF() 

        ' Create a PdfRasterizer object.
		Dim rasterizer As PdfRasterizer = New PdfRasterizer(MyInputPdfFile)

        ' Save the image.   
		rasterizer.Draw("Output.png", ImageFormat.Png,ImageSize.Dpi96);			
             
    End Sub
End Module
using System;
using ceTe.DynamicPDF.Rasterizer;

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;

        //Gets the InputPdf file present in AttachmentFiles
        InputPdf inputPdfFile = files[0].TryGetPdf();

		// Create a PdfRasterizer object.
		PdfRasterizer rasterizer = new PdfRasterizer(inputPdfFile);

		// Save the image.
		rasterizer.Draw("Output.png", ImageFormat.Png,ImageSize.Dpi96);
    }
}

Properties

FileNameGets the Filenames of the Attachment Files present in PDFDocument.

Methods

Equals(Object)Determines whether the specified Object is equal to the current Object .
(Inherited from Object)
GetHashCode()Serves as a hash function for a particular type.
(Inherited from Object)
GetType()Gets the Type of the current instance.
(Inherited from Object)
ToString()Returns a String that represents the current Object .
(Inherited from Object)
TryGetPdf()Gets the Data of the Attachment Files.
TryGetPdf(String)Gets the InputPdf file of the Attachment Files.

See Also

ceTe.DynamicPDF.Rasterizer

In this topic