Show / Hide Table of Contents

# Class Convert.Printer

Convert::Printer is a utility class to install the a printer for print-based conversion of documents for Convert::ToPdf.

##### Inheritance

object
Convert.Printer

##### Inherited Members

object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

###### Namespace: pdftron.PDF

###### Assembly: PDFNet.dll

##### Syntax

    public class Convert.Printer

### Constructors

#### Printer()

##### Declaration

    public Printer()

### Methods

#### GetMode()

Get the current mode for print jobs.

##### Declaration

    public static Convert.Printer.Mode GetMode()

##### Returns

Type | Description
--- | ---
Convert.Printer.Mode | the current print mode

#### GetPrinterName()

Get the name of the PDFNet printer installed in this process session.

##### Declaration

    public static string GetPrinterName()

##### Returns

Type | Description
--- | ---
string | the Unicode name of the PDFNet printer

##### Remarks

if no printer was installed in this process then the predefined string "PDFTron PDFNet" will be returned.

#### Install()

Install the PDFNet printer. Installation can take a few seconds, so it is recommended that you install the printer once as part of your deployment process. Duplicated installations will be quick since the presence of the printer is checked before installation is attempted. There is no need to uninstall the printer after conversions, it can be left installed for later access.

##### Declaration

    public static void Install()

##### Remarks

install PDFNet printer using "PDFTron PDFNet" as the printer name

#### Install(string)

Install the PDFNet printer. Installation can take a few seconds, so it is recommended that you install the printer once as part of your deployment process. Duplicated installations will be quick since the presence of the printer is checked before installation is attempted. There is no need to uninstall the printer after conversions, it can be left installed for later access.

##### Declaration

    public static void Install(string in_printerName)

##### Parameters

Type | Name | Description
--- | --- | ---
string | in_printerName | the name of the printer to install and use for conversions. If in_printerName is not provided then the name "PDFTron PDFNet" is used.

##### Remarks

Installing and uninstalling printer drivers requires the process to be running as administrator.

#### IsInstalled()

Determine if the "PDFTron PDFNet" printer is installed.

##### Declaration

    public static bool IsInstalled()

##### Returns

Type | Description
--- | ---
bool | true if the named printer is installed, false otherwise

#### IsInstalled(string)

Determine if the PDFNet printer is installed.

##### Declaration

    public static bool IsInstalled(string in_printerName)

##### Parameters

Type | Name | Description
--- | --- | ---
string | in_printerName | the name of the printer to install and use for conversions.

##### Returns

Type | Description
--- | ---
bool | true if the named printer is installed, false otherwise

##### Remarks

may or may not check if the printer with the given name is actually a PDFNet printer.

#### SetMode(Mode)

Control how the PDFNet converts files, in particular Office documents.

##### Declaration

    public static void SetMode(Convert.Printer.Mode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
Convert.Printer.Mode | mode | set the print mode. Default is e_auto.

#### SetPrinterName()

Set the name of the PDFNet printer installed in this process session to "PDFTron PDFNet"

##### Declaration

    public static void SetPrinterName()

#### SetPrinterName(string)

Set the name of the PDFNet printer installed in this process session.

##### Declaration

    public static void SetPrinterName(string in_printerName)

##### Parameters

Type | Name | Description
--- | --- | ---
string | in_printerName | the Unicode name of the PDFNet printer

##### Remarks

if no printer was installed in this process then the predefined string "PDFTron PDFNet" will be used.

#### Uninstall()

Uninstall all printers using the PDFNet printer driver.

##### Declaration

    public static void Uninstall()

##### Remarks

Installing and uninstalling printer drivers requires the process to be running as administrator.