| 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.Toolbox.PdfAssembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.4.0+02318d3e3f9645a1305b87026fb971a660079e54
Syntax 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 Exception | Condition |
---|
ArgumentException | if the targetDocument argument has already been closed |
ArgumentException | if the targetDocument argument is read-only |
ArgumentException | if the fileReference argument is not associated with an input document |
ArgumentException | if the fileReference object has already been closed |
ConformanceException | if the document's conformance is PDF/A-1 |
ConformanceException | if 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 |
IOException | Error reading from the input stream or writing to the output stream |
ArgumentNullException | if targetDocument is . |
ArgumentNullException | if fileReference is . |
See Also