PrintTicketConverter.ConvertPrintTicketToDevMode 方法

定义

将指定的 PrintTicket 转换为非托管 DEVMODE 结构。Converts the specified PrintTicket to an unmanaged DEVMODE structure.

重载

ConvertPrintTicketToDevMode(PrintTicket, BaseDevModeType)

将指定的托管 PrintTicket 转换为非托管 DEVMODE 结构,该结构基于 BaseDevModeType 标识的 DEVMODE 结构。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)

将含有指定范围的指定托管代码 PrintTicket 转换为非托管 DEVMODE 结构,该结构基于 BaseDevModeType 标识的 DEVMODE 结构。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)

将指定的托管 PrintTicket 转换为非托管 DEVMODE 结构,该结构基于 BaseDevModeType 标识的 DEVMODE 结构。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[]

参数

printTicket
PrintTicket

要转换的 PrintTicketThe PrintTicket to convert.

baseType
BaseDevModeType

用于识别是将用户默认值还是将打印机默认值 DEVMODE 作为基 DEVMODE 的一个值。A value that identifies whether to use the user default or printer default DEVMODE as the base DEVMODE.

返回

Byte[]

包含新 DEVMODE 结构的 Byte 数组。A Byte array that contains the new DEVMODE structure.

异常

已释放此 PrintTicketConverterThis PrintTicketConverter is already disposed.

printTicket 的值为 null(在 Visual Basic 中为 Nothing)。The value of printTicket is null (Nothing in Visual Basic).

printTicket 的内容的格式不正确。The content of printTicket is not well-formed.

转换失败。The conversion failed.

baseType 不是有效的 BaseDevModeType 值。The baseType is not a valid BaseDevModeType value.

注解

PrintTicket参数的范围必须是整个打印作业。The scope of the PrintTicket parameter must be the entire print job.

此方法不会验证PrintTicketThis method does not validate the PrintTicket. 若要对其进行MergeAndValidatePrintTicket验证,请使用。To validate it, use MergeAndValidatePrintTicket.

有关 DEVMODE 结构的详细信息,请参阅devmodeFor more information on the DEVMODE structure, see DEVMODE.

ConvertPrintTicketToDevMode(PrintTicket, BaseDevModeType, PrintTicketScope)

将含有指定范围的指定托管代码 PrintTicket 转换为非托管 DEVMODE 结构,该结构基于 BaseDevModeType 标识的 DEVMODE 结构。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[]

参数

printTicket
PrintTicket

要转换的 PrintTicketThe PrintTicket to convert.

baseType
BaseDevModeType

用于识别是将用户默认值还是将打印机默认值 DEVMODE 作为基 DEVMODE 的一个值。A value that identifies whether to use the user default or printer default DEVMODE as the base DEVMODE.

scope
PrintTicketScope

一个 PrintTicketScope 值,该值用于指定 PrintTicket 转换是应该在一页、一个文档还是整个打印作业中进行。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.

返回

Byte[]

表示新 DEVMODE 结构的 Byte 缓冲区。A Byte buffer that represents the new DEVMODE structure.

异常

已释放此 PrintTicketConverterThis PrintTicketConverter is already disposed.

printTicket 的值为 null(在 Visual Basic 中为 Nothing)。The value of printTicket is null (Nothing in Visual Basic).

printTicket 的内容的格式不正确。The content of printTicket is not well-formed.

转换失败。The conversion failed.

baseType 不是有效的 BaseDevModeType 值。The baseType is not a valid BaseDevModeType value.

-or- scope 不是有效的 PrintTicketScope 值。The scope is not a valid PrintTicketScope value.

注解

此方法不会验证PrintTicketThis method does not validate the PrintTicket. 若要对其进行MergeAndValidatePrintTicket验证,请使用。To validate it, use MergeAndValidatePrintTicket.

有关 DEVMODE 结构的详细信息,请参阅devmodeFor more information on the DEVMODE structure, see DEVMODE.

适用于