Method RemoveFrom
- Namespace
- BitMiracle.Docotic.Pdf
- Assembly
- BitMiracle.Docotic.Pdf.dll
RemoveFrom(int)
Removes a range of pages from the document's page collection.
public void RemoveFrom(int index)
Parameters
indexintThe zero-based starting index of the pages to remove.
Remarks
Pages are removed starting at the specified index and continuing to the end of the document's page collection.
The index cannot be 0, because a document must contain at
least one page. A PdfException is thrown when attempting to remove pages
beginning with the first page.
Splitting PDF documents is one of the use cases for this method. See the Split PDF documents in C# and VB.NET article for other approaches to this use case.
Exceptions
- ArgumentOutOfRangeException
Thrown when
indexis outside the bounds of the collection or when it equals Count - 1.