Skip to main content

Attached Structure

Version: 12.0

Attached Structure

Represents an attached

public struct Attached : ValueType
Public Structure Attached
Inherits ValueType

Inheritance: Object → ValueType → Attached

Licensing Info​

This struct is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Examples​

The following example shows how to use an artifact.

Imports System
Imports ceTe.DynamicPDF
Imports ceTe.DynamicPDF.PageElements

Module MyModule
Sub Main()
' Create a PDF Document
Dim MyDocument As Document = New Document()
' Specify document as a tagged PDF
MyDocument.Tag = New TagOptions()

' Create a page and add it to the document
Dim MyPage As Page = New Page()
MyDocument.Pages.Add(MyPage)

' Create a background image
Dim MyBackgroundImage As BackgroundImage = New BackgroundImage("C:\MyImage.jpg")

' Create an artifact
Dim MyArtifact As Artifact = New Artifact(ArtifactType.Background, New Attached(Edge.Left, Edge.Bottom, Edge.Right, Edge.Top))

' Add bounding box to the artifact
MyArtifact.SetBoundingBox(New BoundingBox(MyPage.Dimensions.Edge.Left, MyPage.Dimensions.Edge.Bottom, MyPage.Dimensions.Edge.Right, MyPage.Dimensions.Edge.Top))

' Tag the background image with the artifact
MyBackgroundImage.Tag = MyArtifact

' Add the background image to the page
MyPage.Elements.Add(MyBackgroundImage)

' Save the PDF
MyDocument.Draw("C:\MyDocument.pdf")
End Sub
End Module
using System;
using ceTe.DynamicPDF;
using ceTe.DynamicPDF.PageElements;

public class Example
{
public static void CreatePDF(string outputPath, string imagePath)
{
// Create a PDF Document
Document document = new Document();

// Specify document as a tagged PDF
document.Tag = new TagOptions();

// Create a page and add it to the document
Page page = new Page();
document.Pages.Add(page);

// Create a background image
BackgroundImage backgroundImage = new BackgroundImage(imagePath);

// Create an artifact
Artifact artifact = new Artifact(ArtifactType.Background, new Attached(Edge.Left, Edge.Bottom, Edge.Right, Edge.Top));

// Add bounding box to the artifact
artifact.SetBoundingBox(new BoundingBox(page.Dimensions.Edge.Left, page.Dimensions.Edge.Bottom, page.Dimensions.Edge.Right, page.Dimensions.Edge.Top));

// Tag the background image with the artifact
backgroundImage.Tag = artifact;

// Add the background image to the page
page.Elements.Add(backgroundImage);

//Save the PDF
document.Draw(outputPath);
}
}

Constructors​

Attached(Edge)​

Initializes a new instance of the Attached class.

public Attached(Edge value)
Public Sub New (value As Edge)

Parameters​

Value of the edge.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Attached(Edge, Edge)​

Initializes a new instance of the Attached class.

public Attached(Edge value1, Edge value2)
Public Sub New (value1 As Edge, value2 As Edge)

Parameters​

Value of the edge.

Value of the edge.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Attached(Edge, Edge, Edge)​

Initializes a new instance of the Attached class.

public Attached(Edge value1, Edge value2, Edge value3)
Public Sub New (value1 As Edge, value2 As Edge, value3 As Edge)

Parameters​

Value of the edge.

Value of the edge.

Value of the edge.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Attached(Edge, Edge, Edge, Edge)​

Initializes a new instance of the Attached class.

public Attached(Edge value1, Edge value2, Edge value3, Edge value4)
Public Sub New (value1 As Edge, value2 As Edge, value3 As Edge, value4 As Edge)

Parameters​

Value of the edge.

Value of the edge.

Value of the edge.

Value of the edge.

Licensing Info​

This constructor is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

Methods​

Equals(Object)​

Indicates whether this instance and a specified object are equal. (Inherited from ValueType)

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

Parameters​

Another object to compare to.

Returns​

true if and this instance are the same type and represent the same value; otherwise, false.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

GetHashCode()​

Returns the hash code for this instance. (Inherited from ValueType)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A 32-bit signed integer that is the hash code for this instance.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

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.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

SetEdge(Edge)​

Sets the value to the edge.

public void SetEdge(Edge value)
Sub SetEdge(value As Edge)

Parameters​

Value of the edge.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

ToString()​

Returns the fully qualified type name of this instance. (Inherited from ValueType)

public string ToString()
Function ToString() As String

Returns​

A String containing a fully qualified type name.

Licensing Info​

This method is a full DynamicPDF Core Suite feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF