Click or drag to resize
Pdftools logo

DocumentAssemblerAppend Method

This method copies document properties and a range of pages from inDoc.

Namespace: PdfTools.DocumentAssembly
Assembly: PdfTools (in PdfTools.dll) Version: 1.4.0+fc8bb87ea2616e7f35d94e0588d333abae862a7a
Syntax
C#
public void Append(
	Document inDoc,
	int? firstPage = null,
	int? lastPage = null,
	DocumentCopyOptions documentCopyOptions = null,
	PageCopyOptions pageCopyOptions = null
)

Parameters

inDoc  Document
firstPage  NullableInt32  (Optional)

Optional parameter denoting the index of the first page to be copied. This index is one-based. If set, the number must be in the range of 1 (first page) to PageCount (last page).

If not set, 1 is used.

lastPage  NullableInt32  (Optional)

Optional parameter denoting the index of the last page to be copied. This index is one-based. If set, the number must be in the range of 1 (first page) to PageCount (last page).

If not set, PageCount is used.

documentCopyOptions  DocumentCopyOptions  (Optional)
pageCopyOptions  PageCopyOptions  (Optional)
Exceptions
ExceptionCondition
LicenseExceptionThe license check has failed.
ArgumentExceptionThe firstPage or lastPage are not in the allowed range.
ArgumentExceptionIf the method has already been called with any of the following properties set to :
ConformanceExceptionThe conformance level of the input document is not compatible with the conformance level of the output document.
ConformanceExceptionThe explicitly requested conformance level is PDF/A Level A ([!:PdfTools.Pdf.Conformance.PdfA1A], [!:PdfTools.Pdf.Conformance.PdfA2A], or [!:PdfTools.Pdf.Conformance.PdfA3A]) and the copy option CopyLogicalStructure is set to .
InvalidOperationExceptionIf Assemble has already been called.
ProcessingExceptionThe processing has failed.
ArgumentNullExceptionif inDoc is .
See Also