Table of Contents

Class PdfViewerPreferences

Namespace
iText.Kernel.Pdf
Assembly
itext.kernel.dll
public class PdfViewerPreferences : PdfObjectWrapper<PdfDictionary>
Inheritance
PdfViewerPreferences
Inherited Members

Constructors

PdfViewerPreferences()

public PdfViewerPreferences()

PdfViewerPreferences(PdfDictionary)

public PdfViewerPreferences(PdfDictionary pdfObject)

Parameters

pdfObject PdfDictionary

Methods

GetEnforce()

PDF 2.0.

public virtual PdfArray GetEnforce()

Returns

PdfArray

array of names specifying settings to enforce in the PDF processors

Remarks

PDF 2.0. Gets an array of names of Viewer preference settings that shall be enforced by PDF processors and that shall not be overridden by subsequent selections in the application user interface

IsWrappedObjectMustBeIndirect()

protected override bool IsWrappedObjectMustBeIndirect()

Returns

bool

Put(PdfName, PdfObject)

public virtual PdfViewerPreferences Put(PdfName key, PdfObject value)

Parameters

key PdfName
value PdfObject

Returns

PdfViewerPreferences

SetCenterWindow(bool)

This method sets CenterWindow flag to true or false

public virtual PdfViewerPreferences SetCenterWindow(bool centerWindow)

Parameters

centerWindow bool

CenterWindow flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetDirection(PdfViewerPreferencesConstants)

This method sets predominant reading order of text.

public virtual PdfViewerPreferences SetDirection(PdfViewerPreferences.PdfViewerPreferencesConstants direction)

Parameters

direction PdfViewerPreferences.PdfViewerPreferencesConstants

reading order type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetDisplayDocTitle(bool)

This method sets DisplayDocTitle flag to true or false

public virtual PdfViewerPreferences SetDisplayDocTitle(bool displayDocTitle)

Parameters

displayDocTitle bool

DisplayDocTitle flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetDuplex(PdfViewerPreferencesConstants)

This method sets the paper handling option that shall be used when printing the file from the print dialog.

public virtual PdfViewerPreferences SetDuplex(PdfViewerPreferences.PdfViewerPreferencesConstants duplex)

Parameters

duplex PdfViewerPreferences.PdfViewerPreferencesConstants

paper handling option's type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets the paper handling option that shall be used when printing the file from the print dialog. The following values are valid: Simplex, DuplexFlipShortEdge, DuplexFlipLongEdge.

SetEnforce(PdfArray)

PDF 2.0.

public virtual PdfViewerPreferences SetEnforce(PdfArray enforce)

Parameters

enforce PdfArray

array of names specifying settings to enforce in the PDF processors

Returns

PdfViewerPreferences

this PdfViewerPreferences instance

Remarks

PDF 2.0. Sets an array of names of Viewer preference settings that shall be enforced by PDF processors and that shall not be overridden by subsequent selections in the application user interface

SetFitWindow(bool)

This method sets FitWindow flag to true or false

public virtual PdfViewerPreferences SetFitWindow(bool fitWindow)

Parameters

fitWindow bool

FitWindow flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetHideMenubar(bool)

This method sets HideMenuBar flag to true or false

public virtual PdfViewerPreferences SetHideMenubar(bool hideMenubar)

Parameters

hideMenubar bool

HideMenuBar flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetHideToolbar(bool)

This method sets HideToolBar flag to true or false

public virtual PdfViewerPreferences SetHideToolbar(bool hideToolbar)

Parameters

hideToolbar bool

HideToolBar flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetHideWindowUI(bool)

This method sets HideWindowUI flag to true or false

public virtual PdfViewerPreferences SetHideWindowUI(bool hideWindowUI)

Parameters

hideWindowUI bool

HideWindowUI flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetNonFullScreenPageMode(PdfViewerPreferencesConstants)

This method sets NonFullScreenPageMode property.

public virtual PdfViewerPreferences SetNonFullScreenPageMode(PdfViewerPreferences.PdfViewerPreferencesConstants nonFullScreenPageMode)

Parameters

nonFullScreenPageMode PdfViewerPreferences.PdfViewerPreferencesConstants

NonFullScreenPageMode property type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets NonFullScreenPageMode property. Allowed values are UseNone, UseOutlines, useThumbs, UseOC. This entry is meaningful only if the value of the PageMode entry in the Catalog dictionary is FullScreen

SetNumCopies(int)

This method sets the number of copies that shall be printed when the print dialog is opened for this file.

public virtual PdfViewerPreferences SetNumCopies(int numCopies)

Parameters

numCopies int

the number of copies to print when the print dialog is opened

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetPickTrayByPDFSize(bool)

This method sets PickTrayByPDFSize flag to true or false.

public virtual PdfViewerPreferences SetPickTrayByPDFSize(bool pickTrayByPdfSize)

Parameters

pickTrayByPdfSize bool

PickTrayByPDFSize flag's boolean value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetPrintArea(PdfViewerPreferencesConstants)

This method sets the name of the page boundary representing the area of a page that shall be rendered when printing the document.

public virtual PdfViewerPreferences SetPrintArea(PdfViewerPreferences.PdfViewerPreferencesConstants pageBoundary)

Parameters

pageBoundary PdfViewerPreferences.PdfViewerPreferencesConstants

page boundary type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets the name of the page boundary representing the area of a page that shall be rendered when printing the document. Deprecated in PDF 2.0.

SetPrintClip(PdfViewerPreferencesConstants)

This method sets the name of the page boundary to which the contents of a page shall be clipped when printing the document.

public virtual PdfViewerPreferences SetPrintClip(PdfViewerPreferences.PdfViewerPreferencesConstants pageBoundary)

Parameters

pageBoundary PdfViewerPreferences.PdfViewerPreferencesConstants

page boundary type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets the name of the page boundary to which the contents of a page shall be clipped when printing the document. Deprecated in PDF 2.0.

SetPrintPageRange(int[])

This method sets the page numbers used to initialize the print dialog box when the file is printed.

public virtual PdfViewerPreferences SetPrintPageRange(int[] printPageRange)

Parameters

printPageRange int[]

the array of page numbers

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

SetPrintScaling(PdfViewerPreferencesConstants)

This method sets the page scaling option that shall be selected when a print dialog is displayed for this document.

public virtual PdfViewerPreferences SetPrintScaling(PdfViewerPreferences.PdfViewerPreferencesConstants printScaling)

Parameters

printScaling PdfViewerPreferences.PdfViewerPreferencesConstants

page scaling option's type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets the page scaling option that shall be selected when a print dialog is displayed for this document. Valid values are None and AppDefault.

SetViewArea(PdfViewerPreferencesConstants)

This method sets the name of the page boundary representing the area of a page that shall be displayed when viewing the document on the screen.

public virtual PdfViewerPreferences SetViewArea(PdfViewerPreferences.PdfViewerPreferencesConstants pageBoundary)

Parameters

pageBoundary PdfViewerPreferences.PdfViewerPreferencesConstants

page boundary type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets the name of the page boundary representing the area of a page that shall be displayed when viewing the document on the screen. Deprecated in PDF 2.0.

SetViewClip(PdfViewerPreferencesConstants)

This method sets the name of the page boundary to which the contents of a page shall be clipped when viewing the document on the screen.

public virtual PdfViewerPreferences SetViewClip(PdfViewerPreferences.PdfViewerPreferencesConstants pageBoundary)

Parameters

pageBoundary PdfViewerPreferences.PdfViewerPreferencesConstants

page boundary type value

Returns

PdfViewerPreferences

current instance of PdfViewerPreferences

Remarks

This method sets the name of the page boundary to which the contents of a page shall be clipped when viewing the document on the screen. Deprecated in PDF 2.0.