Click or drag to resize
Pdftools logo

ColorSpaceCopy Method

Copy a color space

Copy a color space object from an input document to the given targetDocument. The returned object is associated with the given target document but not yet part of it.

Namespace: PdfTools.Toolbox.Pdf.Content
Assembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.1.0+5820e9ca9ca173983539ffc40abc227fb62e6928
Syntax
C#
public static ColorSpace Copy(
	Document targetDocument,
	ColorSpace colorSpace
)

Parameters

targetDocument  Document
the output document with which the returned object is associated
colorSpace  ColorSpace
a color space of a different document

Return Value

ColorSpace
the copied color space, associated with the current document.
Exceptions
ExceptionCondition
IOExceptionError reading from the source document or writing to the target document
CorruptExceptionThe source document is corrupt
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 colorSpace object is not associated with an input document
ArgumentExceptionif the colorSpace object has already been closed
ArgumentNullExceptionif targetDocument is .
ArgumentNullExceptionif colorSpace is .
See Also