cete.dynamicpdf.printing.border
Border
- Namespace: ceTe.DynamicPDF.Printing
- Assemblies: ceTe.DynamicPDF.Printing.40.x64.dll, ceTe.DynamicPDF.Printing.40.x86.dll
Draws a border around the pages.
public class Border
Public Class Border
Inheritance: Object → Border
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 demonstrates, how to set a border for pages while doing the multi page print.
Imports ceTe.DynamicPDF.Printing
Imports System.Drawing
Module MyModule
Sub Main()
' Create a print job containing the first four pages of the PDF.
Dim printJob As New PrintJob(Printer.[Default], "C:\MyDocument.pdf", 1, 4)
' Creating the object of MultipagePageScaling.
Dim multipagePageScaling As New MultipagePageScaling(4, 2)
' Setting the border and its color.
multipagePageScaling.Border = New Border(Color.Green, 2)
' Setting the top,left,bottom and right margins.
multipagePageScaling.Margin = New ceTe.DynamicPDF.Printing.Margin(5, 5, 5, 5)
' Setting the spacing between pages.
multipagePageScaling.Spacing = New Spacing(2, 2)
' If UniformScaling is true then same scaling percentage will be applied to all pages.
multipagePageScaling.UniformScaling = True
' Applying the multipage scaling.
printJob.PrintOptions.Scaling = multipagePageScaling
' Print the job.
printJob.Print()
End Sub
End Module
using System;
using ceTe.DynamicPDF.Printing;
using System.Drawing;
class MyClass
{
static void Main()
{
// Create a print job containing the first four pages of the PDF.
PrintJob printJob = new PrintJob(Printer.Default, @"C:\MyDocument.pdf", 1, 4);
// Creating the object of MultipagePageScaling.
MultipagePageScaling multipagePageScaling = new MultipagePageScaling(4, 2);
// Setting the border and its color.
multipagePageScaling.Border = new Border(Color.Green, 2);
// Setting the top,left,bottom and right margins.
multipagePageScaling.Margin = new ceTe.DynamicPDF.Printing.Margin(5, 5, 5, 5);
// Setting the spacing between pages.
multipagePageScaling.Spacing = new Spacing(2, 2);
// If UniformScaling is true then same scaling percentage will be applied to all pages.
multipagePageScaling.UniformScaling = true;
// Applying the multipage scaling.
printJob.PrintOptions.Scaling = multipagePageScaling;
// Print the job.
printJob.Print();
}
}
Constructors
Border(Color, Int32)
Initializes a new instance of the Border class.
public Border(Color color, int thickness)
Public Sub New (color As Color, thickness As Integer)
Parameters
- color: Color
The color of the PDF page border.
- thickness: Int32
The thickness of the PDF page border.
Properties
Color
Gets or sets the color of the PDF page border.
public Color Color { get; set; }
Public Property Color As Color
Property Value
Thickness
Gets or sets the thickness of the PDF page border.
public int Thickness { get; set; }
Public Property Thickness As Int32
Property Value
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
- obj: Object
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 .