Aspose::Pdf::Facades::PdfFileEditor::TryInsert method

PdfFileEditor::TryInsert(const System::SharedPtr<System::IO::Stream>&, int32_t, const System::SharedPtr<System::IO::Stream>&, const System::ArrayPtr<int32_t>&, const System::SharedPtr<System::IO::Stream>&) method

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

bool Aspose::Pdf::Facades::PdfFileEditor::TryInsert(const System::SharedPtr<System::IO::Stream> &inputStream, int32_t insertLocation, const System::SharedPtr<System::IO::Stream> &portStream, const System::ArrayPtr<int32_t> &pageNumber, const System::SharedPtr<System::IO::Stream> &outputStream)
ПараметрТипОписание
inputStreamconst System::SharedPtr<System::IO::Stream>&Входной поток Pdf файла.
insertLocationint32_tПозиция вставки во входном файле.
portStreamconst System::SharedPtr<System::IO::Stream>&Поток Pdf файла для страниц.
pageNumberconst System::ArrayPtr<int32_t>&Номер страницы, импортированной в portFile.
outputStreamconst System::SharedPtr<System::IO::Stream>&Выходной поток.

ReturnValue

true, если операция завершилась успешно; иначе false.

Примечания

Метод TryInsert похож на метод Insert, за исключением того, что метод TryInsert не бросает исключение, если операция не удалась.

См. также

PdfFileEditor::TryInsert(const System::SharedPtr<System::IO::Stream>&, int32_t, const System::SharedPtr<System::IO::Stream>&, const System::ArrayPtr<int32_t>&, const System::SharedPtr<System::Web::HttpResponse>&) method

Вставляет документ в другой документ и сохраняет результат в объект ответа.

bool Aspose::Pdf::Facades::PdfFileEditor::TryInsert(const System::SharedPtr<System::IO::Stream> &inputStream, int32_t insertLocation, const System::SharedPtr<System::IO::Stream> &portStream, const System::ArrayPtr<int32_t> &pageNumber, const System::SharedPtr<System::Web::HttpResponse> &response)
ПараметрТипОписание
inputStreamconst System::SharedPtr<System::IO::Stream>&Поток с исходным документом
insertLocationint32_tМесто, куда будет вставлен другой документ.
portStreamconst System::SharedPtr<System::IO::Stream>&Document для вставки.
pageNumberconst System::ArrayPtr<int32_t>&Массив номеров страниц во втором документе, которые будут вставлены.
ответconst System::SharedPtr<System::Web::HttpResponse>&Объект ответа, где будет сохранён результат.

ReturnValue

true, если операция завершилась успешно; иначе false.

Примечания

Метод TryInsert похож на метод Insert, за исключением того, что метод TryInsert не бросает исключение, если операция не удалась.

См. также

PdfFileEditor::TryInsert(const System::String&, int32_t, const System::String&, const System::ArrayPtr<int32_t>&, const System::SharedPtr<System::Web::HttpResponse>&) method

Вставляет содержимое файла в исходный файл и сохраняет результат в объект HttpResponse.

bool Aspose::Pdf::Facades::PdfFileEditor::TryInsert(const System::String &inputFile, int32_t insertLocation, const System::String &portFile, const System::ArrayPtr<int32_t> &pageNumber, const System::SharedPtr<System::Web::HttpResponse> &response)
ПараметрТипОписание
inputFileconst System::String&Имя исходного файла.
insertLocationint32_tНомер Page где будет вставлен второй файл.
portFileconst System::String&Путь к файлу, который будет вставлен.
pageNumberconst System::ArrayPtr<int32_t>&Массив номеров страниц в исходном файле, которые будут вставлены.
ответconst System::SharedPtr<System::Web::HttpResponse>&Объект ответа, где будет сохранён результат.

ReturnValue

true, если операция завершилась успешно; иначе false.

Примечания

Метод TryInsert похож на метод Insert, за исключением того, что метод TryInsert не бросает исключение, если операция не удалась.

См. также

PdfFileEditor::TryInsert(const System::String&, int32_t, const System::String&, const System::ArrayPtr<int32_t>&, const System::String&) method

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

bool Aspose::Pdf::Facades::PdfFileEditor::TryInsert(const System::String &inputFile, int32_t insertLocation, const System::String &portFile, const System::ArrayPtr<int32_t> &pageNumber, const System::String &outputFile)
ПараметрТипОписание
inputFileconst System::String&Входной файл Pdf.
insertLocationint32_tПозиция вставки во входном файле.
portFileconst System::String&Страницы из файла Pdf.
pageNumberconst System::ArrayPtr<int32_t>&Номер страницы, импортированной в portFile.
outputFileconst System::String&Выводит файл Pdf.

ReturnValue

True при успехе, иначе false.

Примечания

Метод TryInsert похож на метод Insert, за исключением того, что метод TryInsert не бросает исключение, если операция не удалась.

См. также