[]
        
(Showing Draft Content)

C1.Win.Document.GraphicsHolder.FromDevice

FromDevice Method

FromDevice(MeasurementDevice, string, out MeasurementDevice, out string)

Creates a graphics holder from a printer or screen device contexts, depending on passing parameters. When the holder is disposed, both graphics and the device context are released (DeleteDC is called on the device context). If printerName is null or specifies invalid printer name then printer will be autoselected from list of available printers, if no printers are installed then FromScreen() method will be called.

Declaration
public static GraphicsHolder FromDevice(MeasurementDevice device, string printerName, out MeasurementDevice actualDevice, out string actualPrinterName)
Public Shared Function FromDevice(device As MeasurementDevice, printerName As String, ByRef actualDevice As MeasurementDevice, ByRef actualPrinterName As String) As GraphicsHolder
Parameters
Type Name Description
MeasurementDevice device

The type of device to use (printer or screen).

string printerName

The name of the printer.

MeasurementDevice actualDevice

The actual device (printer or screen) used to measure the objects of a C1Document or C1FlexReport.

string actualPrinterName

The actual printer name.

Returns
Type Description
GraphicsHolder

The new instance of the graphics holder.