Click or drag to resize
Pdftools logo

ViewerSettingsCopy Method

Copy viewer settings

The newly created viewer settings are associated with the target document, but not yet used as the document's viewer settings.

Namespace: PdfTools.Toolbox.Pdf.Navigation
Assembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.0.0+fdabb036503e9f99735634a6d4f5be875399e9f5
Syntax
C#
public static ViewerSettings Copy(
	Document targetDocument,
	ViewerSettings viewerSettings
)

Parameters

targetDocument  Document
the output document with which the returned object is associated
viewerSettings  ViewerSettings
the viewer settings of a different document

Return Value

ViewerSettings
a viewer settings object with the same content, but associated with the current document.
Exceptions
ExceptionCondition
ConformanceExceptionThe conformance level of the source document is not compatible with the conformance level of the target document.
ArgumentExceptionif the targetDocument argument has already been closed
ArgumentExceptionif the targetDocument argument is read-only
ArgumentExceptionif the viewerSettings argument is not associated with an input document
ArgumentExceptionif the document associated with the viewerSettings object has already been closed
IOExceptionError reading from the stream
ArgumentNullExceptionif targetDocument is .
ArgumentNullExceptionif viewerSettings is .
See Also