PdfFileEditor.Concatenate

Concatenate(string, string, string)

Concatenates two files.

public bool Concatenate(string firstInputFile, string secInputFile, string outputFile)
ParameterTypeDescription
firstInputFileStringFirst file to concatenate.
secInputFileStringSecond file to concatenate.
outputFileStringOutput file.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
fileEditor.Concatenate("file1.pdf", "file2.pdf", "outfile.pdf");

See Also


Concatenate(Stream, Stream, Stream)

Concatenates two files.

public bool Concatenate(Stream firstInputStream, Stream secInputStream, Stream outputStream)
ParameterTypeDescription
firstInputStreamStreamStream of first file.
secInputStreamStreamStream of second file.
outputStreamStreamStream where result file will be stored.

Return Value

True if operation was succeeded.

True if operation was succeeded.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
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.Concatenate(stream1, stream2, outstream);

See Also


Concatenate(Document[], Document)

Concatenates documents.

public bool Concatenate(Document[] src, Document dest)
ParameterTypeDescription
srcDocument[]Array of source documents.
destDocumentDestination document.

Return Value

True if concatenation is successful.

See Also


Concatenate(string[], string)

Concatenates files into one file.

public bool Concatenate(string[] inputFiles, string outputFile)
ParameterTypeDescription
inputFilesString[]Array of files to concatenate.
outputFileStringName of output file.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor pfe = new PdfFileEditor();
pfe.Concatenate(new string[]  { "src1.pdf", "src2.pdf" }, "dest.pdf");

See Also


Concatenate(Stream[], Stream)

Concatenates files

public bool Concatenate(Stream[] inputStream, Stream outputStream)
ParameterTypeDescription
inputStreamStream[]Array of streams to be concatenated.
outputStreamStreamStream where result file will be stored.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor fileEditor = new PdfFileEditor();
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.Concatenate(new Stream[] { stream1, stream2 } , outstream);

See Also


Concatenate(string, string, string, string)

Merges two Pdf documents into a new Pdf document with pages in alternate ways and fill the blank places with blank pages. e.g.: document1 has 5 pages: p1, p2, p3, p4, p5. document2 has 3 pages: p1’, p2’, p3’. Merging the two Pdf document will produce the result document with pages:p1, p1’, p2, p2’, p3, p3’, p4, blankpage, p5, blankpage.

public bool Concatenate(string firstInputFile, string secInputFile, string blankPageFile, 
    string outputFile)
ParameterTypeDescription
firstInputFileStringFirst file.
secInputFileStringSecond file.
blankPageFileStringPDF file with blank page.
outputFileStringResult file.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor pfe = new PdfFileEditor();
pfe.Concatenate("src1.pdf", "src2.pdf", "blank.pdf", "dest.pdf");

See Also


Concatenate(Stream, Stream, Stream, Stream)

Merges two Pdf documents into a new Pdf document with pages in alternate ways and fill the blank places with blank pages. e.g.: document1 has 5 pages: p1, p2, p3, p4, p5. document2 has 3 pages: p1’, p2’, p3’. Merging the two Pdf document will produce the result document with pages:p1, p1’, p2, p2’, p3, p3’, p4, blankpage, p5, blankpage.

public bool Concatenate(Stream firstInputStream, Stream secInputStream, Stream blankPageStream, 
    Stream outputStream)
ParameterTypeDescription
firstInputStreamStreamThe first Pdf Stream.
secInputStreamStreamThe second Pdf Stream.
blankPageStreamStreamThe Pdf Stream with blank page.
outputStreamStreamOutput Pdf Stream.

Return Value

True if operation was succeeded.

Examples

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

See Also


Concatenate(string[], HttpResponse)

Concatenates files and saves reslt into HttpResposnse object.

public bool Concatenate(string[] inputFiles, HttpResponse response)
ParameterTypeDescription
inputFilesString[]Array of files to concatenate.
responseHttpResponseResponse object.

Return Value

true if concatenation was successful.

See Also


Concatenate(Stream[], HttpResponse)

Concatenates files and stores result into HttpResponse object.

public bool Concatenate(Stream[] inputStream, HttpResponse response)
ParameterTypeDescription
inputStreamStream[]Streams array which contain files to concatenate.
responseHttpResponseResponse object/

Return Value

true if operation was succeeded.

See Also