Click or drag to resize
Pdftools logo

ContentElementCopy Method

Copy a content element

The returned object is associated with the given target document but not yet part of it.

Namespace: PdfTools.FourHeights.PdfToolbox.Pdf.Content
Assembly: PdfTools.FourHeights.PdfToolbox (in PdfTools.FourHeights.PdfToolbox.dll) Version: 1.0.0
Syntax
C#
public static ContentElement Copy(
	Document targetDocument,
	ContentElement contentElement
)

Parameters

targetDocument  Document
the output document with which the returned object is associated
contentElement  ContentElement
a content element of a different document

Return Value

ContentElement
the copied content element, associated with the current document
Exceptions
ExceptionCondition
IOExceptionError reading from the source document or writing to the target document
ConformanceExceptionThe conformance level of the source document is not compatible with the conformance level of the target document.
ConformanceExceptionThe conformance of the targetDocument is PDF/A with a conformance level "a": PDF/A-1a, PDF/A-2a, PDF/A-3a.
ArgumentExceptionif the targetDocument argument has already been closed
ArgumentExceptionif the targetDocument argument is read-only
ArgumentExceptionthe contentElement object is not associated with an input document
ArgumentExceptionthe document associated with the contentElement object has already been closed
ArgumentNullExceptionif targetDocument is .
ArgumentNullExceptionif contentElement is .
See Also