cete.dynamicpdf.printing.mediatypelist
MediaTypeList
- Namespace: ceTe.DynamicPDF.Printing
- Assemblies: DynamicPDF.Printing.dll
Represents a list of media types.
public class MediaTypeList : IEnumerable, IEnumerable<MediaType>
Public Class MediaTypeList
Implements IEnumerable, IEnumerable(Of MediaType)
Inheritance: Object → MediaTypeList
Implements: IEnumerable, IEnumerable<MediaType>
Licensing Info
This class is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Examples
The following examples creates a print job, and selects the media type from the printer media type list and prints the job.
Imports System
Imports ceTe.DynamicPDF.Printing
Module MyModule
Sub Main()
' Create a print job Dim printJob As New PrintJob(Printer.[Default], "C:\Temp\DocumentA.pdf")
' Find media types available for default printer Dim mediaTypeList As MediaTypeList = Printer.[Default].MediaTypes
' Set appropriate media type. If mediaTypeList.Standard IsNot Nothing Then printJob.PrintOptions.MediaType = mediaTypeList.Standard End If
' Print the job printJob.Print()
End Sub
End Module
using System;
using ceTe.DynamicPDF.Printing;
class MyClass
{
static void Main()
{ // Create a print job PrintJob printJob = new PrintJob(Printer.Default, "C:\\Temp\\DocumentA.pdf");
// Find media types available for default printer MediaTypeList mediaTypeList = Printer.Default.MediaTypes;
// Set appropriate media type. if(mediaTypeList.Standard!= null) printJob.PrintOptions.MediaType = mediaTypeList.Standard;
// Print the job printJob.Print();
}
}
Properties
Count
Gets the media type count.
public int Count { get; }
Public Property Count As Int32
Property Value
Licensing Info
This property is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Glossy
Gets the glossy media type if it is specified by the printer.
public MediaType Glossy { get; }
Public Property Glossy As MediaType
Property Value
Licensing Info
This property is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Item[Int32]
Gets the media type by its index.
public MediaType this[int index] { get; }
Public Property Item(index As Integer) As MediaType
Property Value
Licensing Info
This property is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Item[String]
Gets the media type by its name.
public MediaType this[string name] { get; }
Public Property Item(name As String) As MediaType
Property Value
Licensing Info
This property is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Standard
Gets the standard media type if it is specified by the printer.
public MediaType Standard { get; }
Public Property Standard As MediaType
Property Value
Licensing Info
This property is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
Transparency
Gets the transparency media type if it is specified by the printer.
public MediaType Transparency { get; }
Public Property Transparency As MediaType
Property Value
Licensing Info
This property is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
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.
Licensing Info
This method is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
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 .
Licensing Info
This method is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
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 DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.
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 .
Licensing Info
This method is a DynamicPDF PrintManager feature. One of the following is required for non-evaluation usage:
- An active DynamicPDF https://www.dynamicpdf.com/ultimate-subscription Subscription
- An active DynamicPDF Professional or Professional Plus Subscription with DynamicPDF PrintManager selected.
- A DynamicPDF PrintManager for .NET v4.X Developer license.