Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents method

PdfFileEditor::TryResizeContents(System::SharedPtr<System::IO::Stream>, System::ArrayPtr<int32_t>, System::SharedPtr<PdfFileEditor::ContentsResizeParameters>, System::SharedPtr<System::Web::HttpResponse>) method

Resizes contents of pages in document. If page is shrinked blank margins are added around the page. Result is stored into HttpResponse object.

bool Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents(System::SharedPtr<System::IO::Stream> source, System::ArrayPtr<int32_t> pages, System::SharedPtr<PdfFileEditor::ContentsResizeParameters> parameters, System::SharedPtr<System::Web::HttpResponse> response)
ParameterTypeDescription
sourceSystem::SharedPtr<System::IO::Stream>Stream of source file.
pagesSystem::ArrayPtr<int32_t>Array of pages to be resized.
parametersSystem::SharedPtr<PdfFileEditor::ContentsResizeParameters>Resize parameters.
responseSystem::SharedPtr<System::Web::HttpResponse>HttpResponse object where result is saved.

ReturnValue

true if operation completed successfully; otherwise, false.

Remarks

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

See Also

PdfFileEditor::TryResizeContents(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::IO::Stream>, System::ArrayPtr<int32_t>, double, double) method

Resizes contents of document pages. Shrinks contents of page and adds margins. New size of contents is specified in default space units.

bool Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents(System::SharedPtr<System::IO::Stream> source, System::SharedPtr<System::IO::Stream> destination, System::ArrayPtr<int32_t> pages, double newWidth, double newHeight)
ParameterTypeDescription
sourceSystem::SharedPtr<System::IO::Stream>Stream which contains source document.
destinationSystem::SharedPtr<System::IO::Stream>Stream where resultant document will be saved.
pagesSystem::ArrayPtr<int32_t>Array of page indexes. If null then all document pages will be processed.
newWidthdoubleNew width of page contents in default space units.
newHeightdoubleNew height of page contents in default space units.

ReturnValue

true if operation completed successfully; otherwise, false.

Remarks

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

See Also

PdfFileEditor::TryResizeContents(System::SharedPtr<System::IO::Stream>, System::SharedPtr<System::IO::Stream>, System::ArrayPtr<int32_t>, System::SharedPtr<PdfFileEditor::ContentsResizeParameters>) method

Resizes contents of pages of the document.

bool Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents(System::SharedPtr<System::IO::Stream> source, System::SharedPtr<System::IO::Stream> destination, System::ArrayPtr<int32_t> pages, System::SharedPtr<PdfFileEditor::ContentsResizeParameters> parameters)
ParameterTypeDescription
sourceSystem::SharedPtr<System::IO::Stream>Stream with source document.
destinationSystem::SharedPtr<System::IO::Stream>Stream with the destination document.
pagesSystem::ArrayPtr<int32_t>Array of page indexes.
parametersSystem::SharedPtr<PdfFileEditor::ContentsResizeParameters>Resize parameters.

ReturnValue

Returns true if success.

Remarks

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

See Also

PdfFileEditor::TryResizeContents(System::String, System::ArrayPtr<int32_t>, System::SharedPtr<PdfFileEditor::ContentsResizeParameters>, System::SharedPtr<System::Web::HttpResponse>) method

Resizes contents of pages in document. If page is shrinked blank margins are added around the page. Result is stored into HttpResponse object.

bool Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents(System::String source, System::ArrayPtr<int32_t> pages, System::SharedPtr<PdfFileEditor::ContentsResizeParameters> parameters, System::SharedPtr<System::Web::HttpResponse> response)
ParameterTypeDescription
sourceSystem::StringPath to source file.
pagesSystem::ArrayPtr<int32_t>Array of pages to be resized.
parametersSystem::SharedPtr<PdfFileEditor::ContentsResizeParameters>Resize parameters.
responseSystem::SharedPtr<System::Web::HttpResponse>HttpResponse object where result is saved.

ReturnValue

true if operation completed successfully; otherwise, false.

Remarks

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

See Also

PdfFileEditor::TryResizeContents(System::String, System::String, System::ArrayPtr<int32_t>, System::SharedPtr<PdfFileEditor::ContentsResizeParameters>) method

Resizes contents of pages in document. If page is shrinked blank margins are added around the page.

bool Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents(System::String source, System::String destination, System::ArrayPtr<int32_t> pages, System::SharedPtr<PdfFileEditor::ContentsResizeParameters> parameters)
ParameterTypeDescription
sourceSystem::StringSource document path.
destinationSystem::StringDestination document path.
pagesSystem::ArrayPtr<int32_t>Array of page indexes (page index starts from 1).
parametersSystem::SharedPtr<PdfFileEditor::ContentsResizeParameters>Parameters of page resize.

ReturnValue

true if resize was successful.

Remarks

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

See Also