Click or drag to resize
Pdftools logo

MetadataCopy Method

Copy a metadata object

Copy a metadata object from an input document to the given targetDocument. The returned object is associated with the target document but not (yet) used as the document metadata. The object can be used either as document metadata using Metadata or as page metadata using Metadata.

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

Parameters

targetDocument  Document
the output document with which the returned object is associated
metadata  Metadata
the metadata of a different document

Return Value

Metadata
a metadata object with the same content, but 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 metadata object has already been closed
ArgumentExceptionif the metadata object is not associated with an input document
ArgumentNullExceptionif targetDocument is .
ArgumentNullExceptionif metadata is .
See Also