Show / Hide Table of Contents

# Class PrinterMode

PrinterMode is a utility class used to set printer options for printing PDF documents.

##### Inheritance

object
PrinterMode

##### Implements

IDisposable

##### Inherited Members

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

###### Namespace: pdftron.PDF

###### Assembly: PDFTronDotNet.dll

##### Syntax

    public class PrinterMode : IDisposable

### Constructors

#### PrinterMode()

##### Declaration

    public PrinterMode()

### Methods

#### Destroy()

##### Declaration

    public void Destroy()

#### Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

##### Declaration

    public void Dispose()

#### Dispose(bool)

##### Declaration

    protected virtual void Dispose(bool disposing)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | disposing |

#### ~PrinterMode()

##### Declaration

    protected ~PrinterMode()

#### SetAutoCenter(bool)

Set automatic centering of document pages onto the output pages.

##### Declaration

    public void SetAutoCenter(bool autoCenter)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | autoCenter | if true will center document pages onto the output pages. Default is true.

#### SetAutoRotate(bool)

Set automatic rotation of document pages to best fit the output pages.

##### Declaration

    public void SetAutoRotate(bool autoRotate)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | autoRotate | if true will rotate document pages onto the output pages. Default is true.

#### SetCollation(bool)

Set the collation of the printing, useful for multiple copies.

##### Declaration

    public void SetCollation(bool collation)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | collation | if true, pages of copies will be printed 1, 2, 3. if false, then pages of copies will be printed 1, 1, 1, ..., 2, 2, 2, ...

#### SetCopyCount(int)

Set the number of copies to be printed.

##### Declaration

    public void SetCopyCount(int copyCount)

##### Parameters

Type | Name | Description
--- | --- | ---
int | copyCount | the number of copies to be printed, must be greater than zero

#### SetDPI(int)

Set the DPI (dots per inch) of the printing.

##### Declaration

    public void SetDPI(int dpi)

##### Parameters

Type | Name | Description
--- | --- | ---
int | dpi | the new dPI

#### SetDuplexing(DuplexMode)

Set the duplexing mode.

##### Declaration

    public void SetDuplexing(PrinterMode.DuplexMode mode)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.DuplexMode | mode | the new duplexing

#### SetNUp(uint, uint)

Set the number of document pages to place on the output pages across and vertically. Pages will be automatically rotated to best fit the page.

##### Declaration

    public void SetNUp(uint x, uint y)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | x | number of papes in horizontal direction
uint | y | number of pages in vertical direction

#### SetNUp(uint, uint, NUpPageOrder)

Set the number of document pages to place on the output pages across and vertically. Pages will be automatically rotated to best fit the page.

Typical values: (2,1) 2-up; (2,2) 4 per page, etc

##### Declaration

    public void SetNUp(uint x, uint y, PrinterMode.NUpPageOrder pageOrder)

##### Parameters

Type | Name | Description
--- | --- | ---
uint | x | number of document pages across. Default is 1.
uint | y | number of document pages down. Default is 1.
PrinterMode.NUpPageOrder | pageOrder | order of document pages across and down output page Default is e_PageOrder_LeftToRightThenTopToBottom.

#### SetNUp(NUp)

Set the number of document pages to place on the output pages across and vertically. Pages will be automatically rotated to best fit the page.

##### Declaration

    public void SetNUp(PrinterMode.NUp nup)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.NUp | nup | given `NUp` object

#### SetNUp(NUp, NUpPageOrder)

Set the number of document pages to place on the output pages across and vertically. Pages will be automatically rotated to best fit the page.

##### Declaration

    public void SetNUp(PrinterMode.NUp nup, PrinterMode.NUpPageOrder pageOrder)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.NUp | nup | one of {e_NUp_1_1, e_NUp_2_1, e_NUp_2_2, e_NUp_3_2, e_NUp_3_3, e_NUp_4_4}. Default is e_NUp_1_1.
PrinterMode.NUpPageOrder | pageOrder | order of document pages across and down output page. Default is e_PageOrder_LeftToRightThenTopToBottom.

#### SetOrientation(Orientation)

Set the orientation of the output document.

##### Declaration

    public void SetOrientation(PrinterMode.Orientation orientation)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.Orientation | orientation | {e_Orientation_Portrait, e_Orientation_Landscape} Default is e_Orientation_Portrait.

#### SetOutputAnnot(PrintContentTypes)

Set the printing of annotations.

##### Declaration

    public void SetOutputAnnot(PrinterMode.PrintContentTypes printContent)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.PrintContentTypes | printContent | one of {e_PrintContent_DocumentOnly, e_PrintContent_DocumentAndAnnotations}. Default is e_PrintContent_DocumentAndAnnotations.

#### SetOutputColor(OutputColor)

Set the color output of the printing.

##### Declaration

    public void SetOutputColor(PrinterMode.OutputColor color)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.OutputColor | color | the new output color

#### SetOutputPageBorder(bool)

Set the printing of page borders, helpful when printing multiple document pages per output page.

##### Declaration

    public void SetOutputPageBorder(bool printBorder)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | printBorder | if true will add a thin frame around each page border. Default is false.

#### SetOutputQuality(OutputQuality)

Set the quality of the printing. Overridden if SetDPI is called.

##### Declaration

    public void SetOutputQuality(PrinterMode.OutputQuality quality)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.OutputQuality | quality | the new output quality

#### SetPaperSize(PaperSize)

Set the output printer paper size (assumed to be correct).

##### Declaration

    public void SetPaperSize(PrinterMode.PaperSize size)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.PaperSize | size | `PaperSize` object

#### SetPaperSize(Rect)

Set the output printer paper size (assumed to be correct).

##### Declaration

    public void SetPaperSize(Rect size)

##### Parameters

Type | Name | Description
--- | --- | ---
Rect | size | the size of the output paper size in points (72 points = 1 inch). Default is US Letter or Rect(0, 0, 612, 792)

#### SetScale(double)

Set the scaling of the document pages to the output pages. Causes SetScaleType(e_ScaleType_CustomScale) to be set.

##### Declaration

    public void SetScale(double scale)

##### Parameters

Type | Name | Description
--- | --- | ---
double | scale | to apply to document pages. 1.0 is no scale, greater than 1.0 increases document page sizes, less than 1.0 reduces document pages sizes on output pages. Default is 1.0

#### SetScaleType(ScaleType)

Set the scaling of the document page to the output pages.

##### Declaration

    public void SetScaleType(PrinterMode.ScaleType scaleType)

##### Parameters

Type | Name | Description
--- | --- | ---
PrinterMode.ScaleType | scaleType | one of {e_ScaleType_None, e_ScaleType_FitToOutputPage, e_ScaleType_ReduceToOutputPage}. Default is e_ScaleType_None.

#### SetUseRleImageCompression(bool)

Set whether RLE image compression is used for printing bitmaps.

##### Declaration

    public void SetUseRleImageCompression(bool useRleImageCompression)

##### Parameters

Type | Name | Description
--- | --- | ---
bool | useRleImageCompression | if true, printer spool file will be reduced. However, some printers do not support this type of image compression and will produce blank pages. Default is false

### Implements

IDisposable