Click or drag to resize
Pdftools logo

FileReferenceCopy Method

Copy a file reference object

Copy a file reference 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.FourHeights.PdfToolbox.Pdf
Assembly: PdfTools.FourHeights.PdfToolbox (in PdfTools.FourHeights.PdfToolbox.dll) Version: 1.0.0
Syntax
C#
public static FileReference Copy(
	Document targetDocument,
	FileReference fileReference
)

Parameters

targetDocument  Document
the output document with which the returned object is associated
fileReference  FileReference
a file reference object of a different document

Return Value

FileReference
the copied file reference, associated with the current document
Exceptions
ExceptionCondition
ArgumentExceptionif the targetDocument argument has already been closed
ArgumentExceptionif the targetDocument argument is read-only
ArgumentExceptionif the fileReference argument is not associated with an input document
ArgumentExceptionif the fileReference object has already been closed
ConformanceExceptionif the document's conformance is PDF/A-1
ConformanceExceptionif the document's conformance is PDF/A-2 and the fileReference object contains an embedded file other than PDF/A-1 or PDF/A-2
IOExceptionError reading from the input stream or writing to the output stream
ArgumentNullExceptionif targetDocument is .
ArgumentNullExceptionif fileReference is .
See Also