PdfFileEditor.SplitToEnd

SplitToEnd(string, int, string)

Splits from specified location, and saves the rear part as a new file Stream.

public bool SplitToEnd(Stream inputStream, int location, Stream outputStream)
ParameterTypeDescription
inputStreamStreamSource Pdf file Stream.
locationInt32The splitting position.
outputStreamStreamOutput Pdf file Stream.

Return Value

True for success, or false.

Remarks

The streams are NOT closed after this operation unless CloseConcatedStreams is specified.

Examples

PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.SplitToEnd(sourceStream, 5, outStream);

See Also


SplitToEnd(string, int, string)

Splits from location, and saves the rear part as a new file.

public bool SplitToEnd(string inputFile, int location, string outputFile)
ParameterTypeDescription
inputFileStringSource Pdf file.
locationInt32The splitting position.
outputFileStringOutput Pdf file path.

Return Value

True for success, or false.

Examples

PdfFileEditor pfe = new PdfFileEditor();
pfe.SplitToEnd("input.pdf", 5, "out.pdf");

See Also


SplitToEnd(Stream, int, Stream)

Splits from specified location, and saves the rear part as a new file Stream.

public bool SplitToEnd(Stream inputStream, int location, Stream outputStream)
ParameterTypeDescription
inputStreamStreamSource Pdf file Stream.
locationInt32The splitting position.
outputStreamStreamOutput Pdf file Stream.

Return Value

True for success, or false.

Remarks

The streams are NOT closed after this operation unless CloseConcatedStreams is specified.

Examples

PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.SplitToEnd(sourceStream, 5, outStream);

See Also