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

PdfFileEditor::TryResizeContents(const System::SharedPtr<System::IO::Stream>&, const System::ArrayPtr<int32_t>&, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters>&, const 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(const System::SharedPtr<System::IO::Stream> &source, const System::ArrayPtr<int32_t> &pages, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters> &parameters, const System::SharedPtr<System::Web::HttpResponse> &response)
ParameterTypeDescription
sourceconst System::SharedPtr<System::IO::Stream>&Stream of source file.
pagesconst System::ArrayPtr<int32_t>&Array of pages to be resized.
parametersconst System::SharedPtr<PdfFileEditor::ContentsResizeParameters>&Resize parameters.
responseconst System::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(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, const System::ArrayPtr<int32_t>&, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters>&) method

Resizes contents of pages of the document.

bool Aspose::Pdf::Facades::PdfFileEditor::TryResizeContents(const System::SharedPtr<System::IO::Stream> &source, const System::SharedPtr<System::IO::Stream> &destination, const System::ArrayPtr<int32_t> &pages, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters> &parameters)
ParameterTypeDescription
sourceconst System::SharedPtr<System::IO::Stream>&Stream with source document.
destinationconst System::SharedPtr<System::IO::Stream>&Stream with the destination document.
pagesconst System::ArrayPtr<int32_t>&Array of page indexes.
parametersconst System::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(const System::SharedPtr<System::IO::Stream>&, const System::SharedPtr<System::IO::Stream>&, const 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(const System::SharedPtr<System::IO::Stream> &source, const System::SharedPtr<System::IO::Stream> &destination, const System::ArrayPtr<int32_t> &pages, double newWidth, double newHeight)
ParameterTypeDescription
sourceconst System::SharedPtr<System::IO::Stream>&Stream which contains source document.
destinationconst System::SharedPtr<System::IO::Stream>&Stream where resultant document will be saved.
pagesconst System::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(const System::String&, const System::ArrayPtr<int32_t>&, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters>&, const 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(const System::String &source, const System::ArrayPtr<int32_t> &pages, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters> &parameters, const System::SharedPtr<System::Web::HttpResponse> &response)
ParameterTypeDescription
sourceconst System::String&Path to source file.
pagesconst System::ArrayPtr<int32_t>&Array of pages to be resized.
parametersconst System::SharedPtr<PdfFileEditor::ContentsResizeParameters>&Resize parameters.
responseconst System::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(const System::String&, const System::String&, const System::ArrayPtr<int32_t>&, const 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(const System::String &source, const System::String &destination, const System::ArrayPtr<int32_t> &pages, const System::SharedPtr<PdfFileEditor::ContentsResizeParameters> &parameters)
ParameterTypeDescription
sourceconst System::String&Source document path.
destinationconst System::String&Destination document path.
pagesconst System::ArrayPtr<int32_t>&Array of page indexes (page index starts from 1).
parametersconst System::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