PdfFileEditor.Append

Append(Stream, Stream[], int, int, Stream)

Appends pages, which are chosen from array of documents in portStreams. The result document includes firstInputFile and all portStreams documents pages in the range startPage to endPage.

public bool Append(Stream inputStream, Stream[] portStreams, int startPage, int endPage, 
    Stream outputStream)
ParameterTypeDescription
inputStreamStreamInput Pdf stream.
portStreamsStream[]Documents to copy pages from.
startPageInt32Page starts in portStreams documents.
endPageInt32Page ends in portStreams documents .
outputStreamStreamOutput Pdf stream.

Return Value

True for success, or false.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
Stream instream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream stream2 = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Append(instream, new Stream[] { stream1, stream2}, 3, 5, outstream);

See Also


Append(string, string[], int, int, string)

Appends pages, which are chosen from portFiles documents. The result document includes firstInputFile and all portFiles documents pages in the range startPage to endPage.

public bool Append(string inputFile, string[] portFiles, int startPage, int endPage, 
    string outputFile)
ParameterTypeDescription
inputFileStringInput Pdf file.
portFilesString[]Documents to copy pages from.
startPageInt32Page starts in portFiles documents.
endPageInt32Page ends in portFiles documents .
outputFileStringOutput Pdf document.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.Append("input.pdf", new string[] { "file1.pdf", "file2.pdf"}, 3, 5, "outfile.pdf");

See Also


Append(string, string, int, int, string)

Appends pages, which are chosen from portFile within the range from startPage to endPage, in portFile at the end of firstInputFile.

public bool Append(string inputFile, string portFile, int startPage, int endPage, string outputFile)
ParameterTypeDescription
inputFileStringInput Pdf file.
portFileStringPages from Pdf file.
startPageInt32Page starts in portFile.
endPageInt32Page ends in portFile.
outputFileStringOutput Pdf document.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.Append("input.pdf", "file1.pdf",  3, 5, "outfile.pdf");

See Also


Append(Stream, Stream, int, int, Stream)

Appends pages,which are chosen from portStream within the range from startPage to endPage, in portStream at the end of firstInputStream.

public bool Append(Stream inputStream, Stream portStream, int startPage, int endPage, 
    Stream outputStream)
ParameterTypeDescription
inputStreamStreamInput file Stream.
portStreamStreamPages from Pdf file Stream.
startPageInt32Page starts in portFile Stream.
endPageInt32Page ends in portFile Stream.
outputStreamStreamOutput Pdf file Stream.

Return Value

True for success, or false.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
Stream instream = new FileStream("input.pdf", FileMode.Open, FileAccess.Read);
Stream stream1 = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream outstream = new FileStream("outfile.pdf", FileMode.Create, FileAccess.Write);
fileEditor.Append(instream, stream1,  3, 5, "outfile.pdf");

See Also


Append(Stream, Stream[], int, int, HttpResponse)

Appends documents to source document and saves result into response object.

public bool Append(Stream inputStream, Stream[] portStreams, int startPage, int endPage, 
    HttpResponse response)
ParameterTypeDescription
inputStreamStreamStream which contains source document.
portStreamsStream[]Array of streams with documents to be appended.
startPageInt32Start page of appended page.
endPageInt32End page of appended pages.
responseHttpResponseResponse object where document will be saved.

Return Value

true if operation was successful.

See Also


Append(string, string[], int, int, HttpResponse)

Appends documents to source document and saves result into HttpResponse object.

public bool Append(string inputFile, string[] portFiles, int startPage, int endPage, 
    HttpResponse response)
ParameterTypeDescription
inputFileStringName of file containing source document.
portFilesString[]Array of file names containing appended documents.
startPageInt32Start page of appended pages.
endPageInt32End page of appended pages.
responseHttpResponseResponse object where document will be saved.

Return Value

true if operation was succeeded.

See Also