Aspose::Pdf::Facades::PdfFileEditor::TryExtract method

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

Extracts pages specified by number array, saves as a new Pdf file.

bool Aspose::Pdf::Facades::PdfFileEditor::TryExtract(const System::SharedPtr<System::IO::Stream> &inputStream, const System::ArrayPtr<int32_t> &pageNumber, const System::SharedPtr<System::IO::Stream> &outputStream)
ParameterTypeDescription
inputStreamconst System::SharedPtr<System::IO::Stream>&Input file Stream.
pageNumberconst System::ArrayPtr<int32_t>&Index of page out of the input file.
outputStreamconst System::SharedPtr<System::IO::Stream>&Output file stream.

ReturnValue

True for success, or false.

Remarks

The TryExtract method is like the Extract method, except the TryExtract method does not throw an exception if the operation fails.

See Also

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

Extracts specified pages form source file and stores result into HttpResponse object.

bool Aspose::Pdf::Facades::PdfFileEditor::TryExtract(const System::SharedPtr<System::IO::Stream> &inputStream, const System::ArrayPtr<int32_t> &pageNumber, const System::SharedPtr<System::Web::HttpResponse> &response)
ParameterTypeDescription
inputStreamconst System::SharedPtr<System::IO::Stream>&Stream of source document.
pageNumberconst System::ArrayPtr<int32_t>&Array of page numbers which will be extracted.
responseconst System::SharedPtr<System::Web::HttpResponse>&HttpResponse object where result will be stored.

ReturnValue

true if operation completed successfully; otherwise, false.

Remarks

The TryExtract method is like the Extract method, except the TryExtract method does not throw an exception if the operation fails.

See Also

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

Extracts specified pages from source file and stores result into HttpResponse object.

bool Aspose::Pdf::Facades::PdfFileEditor::TryExtract(const System::String &inputFile, const System::ArrayPtr<int32_t> &pageNumber, const System::SharedPtr<System::Web::HttpResponse> &response)
ParameterTypeDescription
inputFileconst System::String&Source file path.
pageNumberconst System::ArrayPtr<int32_t>&Array of page numbers which will be extracted.
responseconst System::SharedPtr<System::Web::HttpResponse>&HttpResponse object where result will be stored.

ReturnValue

true if operation completed successfully; otherwise, false.

Remarks

The TryExtract method is like the Extract method, except the TryExtract method does not throw an exception if the operation fails.

See Also

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

Extracts pages specified by number array, saves as a new PDF file.

bool Aspose::Pdf::Facades::PdfFileEditor::TryExtract(const System::String &inputFile, const System::ArrayPtr<int32_t> &pageNumber, const System::String &outputFile)
ParameterTypeDescription
inputFileconst System::String&Input file path.
pageNumberconst System::ArrayPtr<int32_t>&Index of page out of the input file.
outputFileconst System::String&Output file path.

ReturnValue

true if operation completed successfully; otherwise, false.

Remarks

The TryExtract method is like the Extract method, except the TryExtract method does not throw an exception if the operation fails.

See Also

PdfFileEditor::TryExtract(const System::String&, int32_t, int32_t, const System::String&) method

Extracts pages from input file,saves as a new Pdf file.

bool Aspose::Pdf::Facades::PdfFileEditor::TryExtract(const System::String &inputFile, int32_t startPage, int32_t endPage, const System::String &outputFile)
ParameterTypeDescription
inputFileconst System::String&Input Pdf file path.
startPageint32_tStart page number.
endPageint32_tEnd page number.
outputFileconst System::String&Output Pdf file path.

ReturnValue

True for success, or false.

Remarks

The TryExtract method is like the Extract method, except the TryExtract method does not throw an exception if the operation fails.

See Also