PdfFileEditor.Insert

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

Вставляет страницы из другого файла в Pdf файл в указанное место.

public bool Insert(string inputFile, int insertLocation, string portFile, int startPage, 
    int endPage, string outputFile)
ПараметрТипОписание
inputFileStringВходной Pdf файл.
insertLocationInt32Позиция во входном файле.
portFileStringПортируемый Pdf файл.
startPageInt32Начальная позиция в portFile.
endPageInt32Конечная позиция в portFile.
outputFileStringВыходной Pdf файл.

Возвращаемое значение

True при успехе, или false.

Примеры

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

См. также


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

Вставляет страницы из другого файла во входной Pdf файл.

public bool Insert(Stream inputStream, int insertLocation, Stream portStream, int startPage, 
    int endPage, Stream outputStream)
ПараметрТипОписание
inputStreamStreamВходной поток Pdf файла.
insertLocationInt32Позиция вставки во входном файле.
portStreamStreamПоток Pdf файла для страниц.
startPageInt32С какой страницы начинать.
endPageInt32На какой странице заканчивать.
outputStreamStreamВыходной поток.

Возвращаемое значение

True при успехе, или false.

Примеры

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);

См. также


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

Вставляет страницы из другого файла во входной Pdf файл.

public bool Insert(string inputFile, int insertLocation, string portFile, int[] pageNumber, 
    string outputFile)
ПараметрТипОписание
inputFileStringВходной Pdf файл.
insertLocationInt32Позиция вставки во входном файле.
portFileStringСтраницы из Pdf файла.
pageNumberInt32[]Номер страницы, портируемой в portFile.
outputFileStringВыходной Pdf файл.

Возвращаемое значение

True при успехе, или false.

Примеры

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

См. также


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

Вставляет страницы из другого файла во входной Pdf файл.

public bool Insert(Stream inputStream, int insertLocation, Stream portStream, int[] pageNumber, 
    Stream outputStream)
ПараметрТипОписание
inputStreamStreamВходной поток Pdf файла.
insertLocationInt32Позиция вставки во входном файле.
portStreamStreamПоток Pdf файла для страниц.
pageNumberInt32[]Номер страницы, портируемой в portFile.
outputStreamStreamВыходной поток.

Возвращаемое значение

True, если операция была успешной.

Примеры

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);

См. также