PdfDocument.CopyPages Method (PdfPage[])

Copies specified pages into new PdfDocument. This PdfDocument remains unchanged.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public PdfDocument CopyPages(
	PdfPage[] pages
)
VB
Public Function CopyPages ( 
	pages As PdfPage()
) As PdfDocument

Parameters

pages
Type: BitMiracle.Docotic.Pdf.PdfPage[]
The array of pages to copy.

Return Value

Type: PdfDocument
A new PdfDocument that contains copied pages.

Remarks

This PdfDocument remains unchanged.

Use ExtractPages() if you want to extract pages from this PdfDocument.

Try RemoveUnusedResources() method on the new document. This method can reduce document size in cases when the copied pages reference unused resources such as fonts, images, patterns.

See Also