Rediger

Del via


PrintTicketConverter.ConvertDevModeToPrintTicket Method

Definition

Converts the specified DEVMODE structure to a managed code PrintTicket.

Overloads

ConvertDevModeToPrintTicket(Byte[])

Converts the specified DEVMODE structure to a managed code PrintTicket.

ConvertDevModeToPrintTicket(Byte[], PrintTicketScope)

Converts the specified DEVMODE structure to a managed code PrintTicket that has the specified scope.

ConvertDevModeToPrintTicket(Byte[])

Converts the specified DEVMODE structure to a managed code PrintTicket.

public:
 System::Printing::PrintTicket ^ ConvertDevModeToPrintTicket(cli::array <System::Byte> ^ devMode);
public System.Printing.PrintTicket ConvertDevModeToPrintTicket (byte[] devMode);
member this.ConvertDevModeToPrintTicket : byte[] -> System.Printing.PrintTicket
Public Function ConvertDevModeToPrintTicket (devMode As Byte()) As PrintTicket

Parameters

devMode
Byte[]

A Byte array that contains the DEVMODE structure.

Returns

The new managed PrintTicket.

Exceptions

This PrintTicketConverter is already disposed.

The value of devMode is null.

The content of devMode is not well-formed.

The conversion failed.

Remarks

For more information on the DEVMODE structure, see DEVMODE.

The scope of the returned PrintTicket is the entire print job.

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

Applies to

ConvertDevModeToPrintTicket(Byte[], PrintTicketScope)

Converts the specified DEVMODE structure to a managed code PrintTicket that has the specified scope.

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

Parameters

devMode
Byte[]

A Byte buffer containing the DEVMODE structure to convert.

scope
PrintTicketScope

A PrintTicketScope value that specifies whether the new PrintTicket applies to a page, a document, or an entire print job.

Returns

The new PrintTicket.

Exceptions

This PrintTicketConverter is already disposed.

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

The content of devMode is not well-formed.

The conversion failed.

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