Szerkesztés

Megosztás a következőn keresztül:


PrintTicketConverter.ConvertPrintTicketToDevMode Method

Definition

Converts the specified PrintTicket to an unmanaged DEVMODE structure.

Overloads

ConvertPrintTicketToDevMode(PrintTicket, BaseDevModeType)

Converts the specified managed PrintTicket to an unmanaged DEVMODE structure that is based on the DEVMODE structure identified by the BaseDevModeType.

ConvertPrintTicketToDevMode(PrintTicket, BaseDevModeType, PrintTicketScope)

Converts the specified managed code PrintTicket with the specified scope, into an unmanaged DEVMODE structure that is based on the DEVMODE structure identified by the BaseDevModeType.

ConvertPrintTicketToDevMode(PrintTicket, BaseDevModeType)

Converts the specified managed PrintTicket to an unmanaged DEVMODE structure that is based on the DEVMODE structure identified by the BaseDevModeType.

public:
 cli::array <System::Byte> ^ ConvertPrintTicketToDevMode(System::Printing::PrintTicket ^ printTicket, System::Printing::Interop::BaseDevModeType baseType);
public byte[] ConvertPrintTicketToDevMode (System.Printing.PrintTicket printTicket, System.Printing.Interop.BaseDevModeType baseType);
member this.ConvertPrintTicketToDevMode : System.Printing.PrintTicket * System.Printing.Interop.BaseDevModeType -> byte[]
Public Function ConvertPrintTicketToDevMode (printTicket As PrintTicket, baseType As BaseDevModeType) As Byte()

Parameters

printTicket
PrintTicket

The PrintTicket to convert.

baseType
BaseDevModeType

A value that identifies whether to use the user default or printer default DEVMODE as the base DEVMODE.

Returns

Byte[]

A Byte array that contains the new DEVMODE structure.

Exceptions

This PrintTicketConverter is already disposed.

The value of printTicket is null (Nothing in Visual Basic).

The content of printTicket is not well-formed.

The conversion failed.

The baseType is not a valid BaseDevModeType value.

Remarks

The scope of the PrintTicket parameter must be the entire print job.

This method does not validate the PrintTicket. To validate it, use MergeAndValidatePrintTicket.

For more information on the DEVMODE structure, see DEVMODE.

Applies to

ConvertPrintTicketToDevMode(PrintTicket, BaseDevModeType, PrintTicketScope)

Converts the specified managed code PrintTicket with the specified scope, into an unmanaged DEVMODE structure that is based on the DEVMODE structure identified by the BaseDevModeType.

public:
 cli::array <System::Byte> ^ ConvertPrintTicketToDevMode(System::Printing::PrintTicket ^ printTicket, System::Printing::Interop::BaseDevModeType baseType, System::Printing::PrintTicketScope scope);
public byte[] ConvertPrintTicketToDevMode (System.Printing.PrintTicket printTicket, System.Printing.Interop.BaseDevModeType baseType, System.Printing.PrintTicketScope scope);
member this.ConvertPrintTicketToDevMode : System.Printing.PrintTicket * System.Printing.Interop.BaseDevModeType * System.Printing.PrintTicketScope -> byte[]
Public Function ConvertPrintTicketToDevMode (printTicket As PrintTicket, baseType As BaseDevModeType, scope As PrintTicketScope) As Byte()

Parameters

printTicket
PrintTicket

The PrintTicket to convert.

baseType
BaseDevModeType

A value that identifies whether to use the user default or printer default DEVMODE as the base DEVMODE.

scope
PrintTicketScope

A PrintTicketScope value that specifies whether the conversion of the PrintTicket should be done at the scope of a page, a document, or an entire print job.

Returns

Byte[]

A Byte buffer that represents the new DEVMODE structure.

Exceptions

This PrintTicketConverter is already disposed.

The value of printTicket is null (Nothing in Visual Basic).

The content of printTicket is not well-formed.

The conversion failed.

The baseType is not a valid BaseDevModeType value.

-or-

The scope is not a valid PrintTicketScope value.

Remarks

This method does not validate the PrintTicket. To validate it, use MergeAndValidatePrintTicket.

For more information on the DEVMODE structure, see DEVMODE.

Applies to