Click or drag to resize
Pdftools logo

GroupCopyFromPage Method

Create a group object from a page.

From a given page in an input document, create a group object in the given target document. The returned object is associated with the target document but not yet part of it.

A group that contains interactive elements can be painted once only. Interactive elements are annotations, group fields, outlines or logical structure information. If a group needs to be painted multiple times, interactive elements can be flattened or the group can be copied multiple times from the page.

There are some interactive elements such as form fields or text annotations that cannot be rotated. So if you plan to rotate the group, it is recommended to flatten form fields and annotations.


Namespace: PdfTools.Toolbox.Pdf.Content
Assembly: PdfTools.Toolbox (in PdfTools.Toolbox.dll) Version: 1.0.0+fdabb036503e9f99735634a6d4f5be875399e9f5
Syntax
C#
public static Group CopyFromPage(
	Document targetDocument,
	Page page,
	PageCopyOptions options
)

Parameters

targetDocument  Document
the output document with which the returned object is associated
page  Page
a page of a different document
options  PageCopyOptions
the copy options

Return Value

Group
the copied group, associated with the current document.
Exceptions
ExceptionCondition
IOExceptionError reading from the input document or writing to the output document
CorruptExceptionThe input document is corrupt
ConformanceExceptionThe conformance level of the source document is not compatible with the conformance level of the target document.
ConformanceExceptionThe explicitly requested conformance level is PDF/A Level A (PdfA1A, PdfA2A, or PdfA3A) and the copy option CopyLogicalStructure is not set.
ArgumentExceptionif the targetDocument argument has already been closed
ArgumentExceptionif the targetDocument argument is read-only
ArgumentExceptionif the page object is not associated with an input document
ArgumentExceptionif the document associated with the page object has already been closed
ArgumentExceptionif the argument options has FormFields set to Copy and the targetDocument contains form fields that have either been copied explicitly with Copy(Document, FieldNode) or created with Create(Document), Create(Document), Create(Document, Int32), Create(Document), Create(Document), Create(Document), or Create(Document).
ArgumentExceptionif the argument options has UnsignedSignatures set to Copy and the targetDocument contains form fields that have either been copied explicitly with Copy(Document, FieldNode) or created with Create(Document), Create(Document), Create(Document, Int32), Create(Document), Create(Document), Create(Document), or Create(Document).
ArgumentExceptionif options has CopyOutlineItems set to and the targetDocument contains outline items that have been copied explicitly with Copy(Document, OutlineItem, OutlineCopyOptions).
ArgumentNullExceptionif targetDocument is .
ArgumentNullExceptionif page is .
See Also