Method CopyPages
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
CopyPages(int[])
Copies pages with specified indexes into new PdfDocument.
public PdfDocument CopyPages(int[] indexes)
Parameters
indexes
int[]The array of zero-based indexes of the pages to copy.
Returns
- PdfDocument
A new PdfDocument that contains copied pages.
Remarks
This PdfDocument remains unchanged.
Use this method to split PDF documents. Read the Split PDF documents in C# and VB.NET article for examples of using this method.
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.
CopyPages(PdfPage[])
Copies specified pages into new PdfDocument. This PdfDocument remains unchanged.
public PdfDocument CopyPages(PdfPage[] pages)
Parameters
pages
PdfPage[]The array of pages to copy.
Returns
- PdfDocument
A new PdfDocument that contains copied pages.
Remarks
This PdfDocument remains unchanged.
Use this method to split PDF documents. Read the Split PDF documents in C# and VB.NET article for examples of using this method.
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.
CopyPages(int, int)
Copies a range of pages into new PdfDocument. This PdfDocument remains unchanged.
public PdfDocument CopyPages(int index, int count)
Parameters
index
intThe zero-based starting index of the range of pages to copy.
count
intThe number of pages to copy.
Returns
- PdfDocument
A new PdfDocument that contains copied pages.
Remarks
This PdfDocument remains unchanged.
Use this method to split PDF documents. Read the Split PDF documents in C# and VB.NET article for examples of using this method.
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.
CopyPages(int, int, PdfConfigurationOptions)
Copies a range of pages into new PdfDocument using specified configuration options. This PdfDocument remains unchanged.
public PdfDocument CopyPages(int index, int count, PdfConfigurationOptions options)
Parameters
index
intThe zero-based starting index of the range of pages to copy.
count
intThe number of pages to copy.
options
PdfConfigurationOptionsThe configuration options.
Returns
- PdfDocument
A new PdfDocument that contains copied pages.
Remarks
This PdfDocument remains unchanged.
The new document will use the specified configuration options.
Use this method to split PDF documents. Read the Split PDF documents in C# and VB.NET article for examples of using this method.
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.
Read the Font loading in cloud environments section for an example of using configuration options.