Skip to main content

MediaType

Version: 2.0

cete.dynamicpdf.printing.mediatype

MediaType​

  • Namespace: ceTe.DynamicPDF.Printing
  • Assemblies: ceTe.DynamicPDF.Printing.40.x64.dll, ceTe.DynamicPDF.Printing.40.x86.dll

Represents a media type.

public class MediaType
Public Class MediaType

Inheritance: Object → MediaType

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 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​

DeviceContextMediaType​

Gets the value of the media type from DC_MEDIATYPES array.

public int DeviceContextMediaType { get; }
Public Property DeviceContextMediaType As Int32

Property Value​

Int32

Name​

Gets the name of the media type.

public string Name { get; }
Public Property Name As String

Property Value​

String

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​

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 .

See Also​

ceTe.DynamicPDF.Printing