MediaTypeList

Represents a list of media types.

public class MediaTypeList : IEnumerable, IEnumerable<MediaType>
Public Class MediaTypeList
    Implements IEnumerable, IEnumerable(Of MediaType)

Inheritance: ObjectMediaTypeList

Implements: IEnumerable, IEnumerable<MediaType>

Licensing Info

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

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

CountGets the media type count.
GlossyGets the glossy media type if it is specified by the printer.
Item[Int32]Gets the media type by its index.
Item[String]Gets the media type by its name.
StandardGets the standard media type if it is specified by the printer.
TransparencyGets the transparency media type if it is specified by the printer.

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)

See Also

ceTe.DynamicPDF.Printing

In this topic