PdfFileEditor.Delete

Delete(string, int[], string)

Deletes pages specified by number array from input file, saves as a new Pdf file.

public bool Delete(string inputFile, int[] pageNumber, string outputFile)
ParameterTypeDescription
inputFileStringInput file path.
pageNumberInt32[]Index of page out of the input file.
outputFileStringOutput file path.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor pfe = new PdfFileEditor();
pfe.Delete("input.pdf", new int[] { 2, 3 }, "out.pdf");

See Also


Delete(Stream, int[], Stream)

Deletes pages specified by number array from input file, saves as a new Pdf file.

public bool Delete(Stream inputStream, int[] pageNumber, Stream outputStream)
ParameterTypeDescription
inputStreamStreamInput file Stream.
pageNumberInt32[]Index of page out of the input file.
outputStreamStreamOutput file stream.

Return Value

True for success, or false.

Examples

PdfFileEditor pfe = new PdfFileEditor();
Stream intputStream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream outputStream = new FileStream("output.pdf", FileMode.Create, FileAccess.Write);
pfe.Delete(inputStream, new int[] { 2, 3 }, outputStream);

See Also


Delete(string, int[], HttpResponse)

Deletes specified pages from document and stores result into HttpResponse object.

public bool Delete(string inputFile, int[] pageNumber, HttpResponse response)
ParameterTypeDescription
inputFileStringPath of source file.
pageNumberInt32[]Array of page numbers which must be deleted.
responseHttpResponseResponse object where result document will be stored.

Return Value

True if operation was succeeded.

See Also


Delete(Stream, int[], HttpResponse)

Deletes specified pages from document and saves result into HttpResponse object.

public bool Delete(Stream inputStream, int[] pageNumber, HttpResponse response)
ParameterTypeDescription
inputStreamStreamSource document stream.
pageNumberInt32[]Array of page numbers which will be deleted.
responseHttpResponseHttpResponse object

Return Value

True if operation succeded.

See Also