PdfFileEditor.Insert

Insert(string, int, string, int, int, string)

Inserts pages from an other file into the Pdf file at a position.

public bool Insert(string inputFile, int insertLocation, string portFile, int startPage, 
    int endPage, string outputFile)
ParameterTypeDescription
inputFileStringInput Pdf file.
insertLocationInt32Position in input file.
portFileStringThe porting Pdf file.
startPageInt32Start position in portFile.
endPageInt32End position in portFile.
outputFileStringOutput Pdf file.

Return Value

True for success, or false.

Examples

PdfFileEditor pfe = new PdfFileEditor();
pfe.Insert("file1.pdf", 1, "file2.pdf", 2, 6, "out.pdf");

See Also


Insert(Stream, int, Stream, int, int, Stream)

Inserts pages from an other file into the input Pdf file.

public bool Insert(Stream inputStream, int insertLocation, Stream portStream, int startPage, 
    int endPage, Stream outputStream)
ParameterTypeDescription
inputStreamStreamInput Stream of Pdf file.
insertLocationInt32Insert position in input file.
portStreamStreamStream of Pdf file for pages.
startPageInt32From which page to start.
endPageInt32To which page to end.
outputStreamStreamOutput Stream.

Return Value

True for success, or false.

Examples

PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream insertedStream = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Insert(sourceStream, 1, insertedStream, 2, 6, outStream);

See Also


Insert(string, int, string, int[], string)

Inserts pages from an other file into the input Pdf file.

public bool Insert(string inputFile, int insertLocation, string portFile, int[] pageNumber, 
    string outputFile)
ParameterTypeDescription
inputFileStringInput Pdf file.
insertLocationInt32Insert position in input file.
portFileStringPages from the Pdf file.
pageNumberInt32[]The page number of the ported in portFile.
outputFileStringOutput Pdf file.

Return Value

True for success, or false.

Examples

PdfFileEditor pfe = new PdfFileEditor();
pfe.Insert("file1.pdf", 1, "file2.pdf", new int[] { 2, 6 }, "out.pdf");

See Also


Insert(Stream, int, Stream, int[], Stream)

Inserts pages from an other file into the input Pdf file.

public bool Insert(Stream inputStream, int insertLocation, Stream portStream, int[] pageNumber, 
    Stream outputStream)
ParameterTypeDescription
inputStreamStreamInput Stream of Pdf file.
insertLocationInt32Insert position in input file.
portStreamStreamStream of Pdf file for pages.
pageNumberInt32[]The page number of the ported in portFile.
outputStreamStreamOutput Stream.

Return Value

True if operation was succeeded.

Examples

PdfFileEditor pfe = new PdfFileEditor();
Stream sourceStream = new FileStream("file1.pdf", FileMode.Open, FileAccess.Read);
Stream insertedStream = new FileStream("file2.pdf", FileMode.Open, FileAccess.Read);
Stream outStream = new FileStream("out.pdf", FileMode.Create, FileAccess.Write);
pfe.Insert(sourceStream, 1, insertedStream, new int[] { 3, 4, 5}, outStream);

See Also


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

Inserts contents of file into source file and stores result into HttpResponse object.

public bool Insert(string inputFile, int insertLocation, string portFile, int[] pageNumber, 
    HttpResponse response)
ParameterTypeDescription
inputFileStringSource file name.
insertLocationInt32Page number where second file will be inserted.
portFileStringPath to file which will be inserted.
pageNumberInt32[]Array of page numbers in source file wihich will be inserted.
responseHttpResponseResponse object where result will be stored.

Return Value

true of inserting was successful.

See Also


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

Inserts document into other document and stores result into response object.

public bool Insert(Stream inputStream, int insertLocation, Stream portStream, int[] pageNumber, 
    HttpResponse response)
ParameterTypeDescription
inputStreamStreamStream with source document
insertLocationInt32Location where other document will be inserted.
portStreamStreamDocument to be inserted.
pageNumberInt32[]Array of page numbers in second document which will be inserted.
responseHttpResponseResponse object where result will be stored.

Return Value

True if operation was succeeded.

See Also