Method Split
Split(byte[], IReadOnlyList<PageRange>, IReadOnlyList<Stream>, PdfAssemblyOptions?)
Writes one document per selection, all taken from one source.
public static IReadOnlyList<PdfAssemblyResult> Split(byte[] source, IReadOnlyList<PageRange> parts, IReadOnlyList<Stream> outputs, PdfAssemblyOptions? options = null)
Parameters
sourcebyte[]The source PDF's bytes.
partsIReadOnlyList<PageRange>The selections, one per output document.
outputsIReadOnlyList<Stream>A writable stream per selection, in the same order.
optionsPdfAssemblyOptionsThe assembly settings, or null for the defaults.
Returns
- IReadOnlyList<PdfAssemblyResult>
One result per output, in the same order.
Remarks
Splitting into single pages is parts of Single(int) — the
method takes selections rather than assuming one page each so that splitting a report
into its chapters does not need a different method from splitting it into its pages.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The counts of parts and outputs differ, or there are no parts.
Split(string, IReadOnlyList<PageRange>, IReadOnlyList<string>, PdfAssemblyOptions?)
Writes one document per selection, all taken from one source.
public static IReadOnlyList<PdfAssemblyResult> Split(string sourcePath, IReadOnlyList<PageRange> parts, IReadOnlyList<string> outputPaths, PdfAssemblyOptions? options = null)
Parameters
sourcePathstringThe source PDF's path.
partsIReadOnlyList<PageRange>The selections, one per output document.
outputPathsIReadOnlyList<string>A path per selection, in the same order.
optionsPdfAssemblyOptionsThe assembly settings, or null for the defaults.
Returns
- IReadOnlyList<PdfAssemblyResult>
One result per output, in the same order.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The counts of parts and outputs differ, or there are no parts.