> ## Documentation Index
> Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# Aspose Document Conversion


[Cloudinary](https://cloudinary.com) is a cloud-based service that provides an end-to-end image management solution including uploads, storage, transformations, optimizations and delivery.

Cloudinary offers a rich set of image transformation and format conversion capabilities. Cloudinary allows you to upload images and non-image raw files to the cloud. Images and PDF files can be converted to various image formats and can be cropped on the fly and further transformed to match the graphic design of your websites and mobile applications.
[Aspose](https://www.aspose.com/) is a leading vendor of development components, including a powerful set of file management and conversion products. Cloudinary provides an add-on for using Aspose's Office document conversion capabilities, fully integrated into Cloudinary's image management and transformation pipeline.

With Aspose's Document Conversion add-on, you can extend Cloudinary's powerful format conversion and image transformation capabilities with automatic conversion of your Microsoft Office documents, spreadsheets and presentations to PDF documents and image thumbnails. 
#### Getting started

Before you can use the Aspose Document Conversion add-on:

* You must have a Cloudinary account. If you don't already have one, you can [sign up](https://cloudinary.com/users/register_free) for a free account. 

* Register for the add-on: make sure you're logged in to your account and then go to the [Add-ons](https://console.cloudinary.com/app/settings/addons) page. For more information about add-on registrations, see [Registering for add-ons](cloudinary_add_ons#registering_for_add_ons).

* Keep in mind that many of the examples on this page use our SDKs. For SDK installation and configuration details, see the relevant [SDK](cloudinary_sdks) guide.
  
* If you're new to Cloudinary, you may want to take a look at the [Developer Kickstart](dev_kickstart) for a hands-on, step-by-step introduction to a variety of features.

## Convert Office documents

When you apply the Aspose add-on while uploading or updating a Microsoft Office file, the add-on converts the file to an image of type PDF and stores the converted file in addition to your original `raw` Office file. 

> **NOTES**:
>
> * Make sure to embed any custom fonts in the original file.

> * The Aspose add-on supports converting files up to 10 MB.

### Supported Office file formats
The following Office file formats are supported: 
`doc`, `docx`, `docm`, `dotx`, `rtf`, `txt`, `xls`, `xlsx`, `xlsm`, `pot`, `potm`, `potx`, `pps`, `ppsm`, `pptx`, `ppt`, and `pptm`.

### Converting Office files on upload
To convert a document using the Aspose add-on while uploading the original Office file, set the `raw_convert` parameter of your `upload` command to `aspose`. Additionally, make sure to set `resource_type` parameter to either `raw` or `auto` (instructing Cloudinary to automatically detect that the file is a non-image `raw` file).

```multi
|ruby
Cloudinary::Uploader.upload("my_file_name.docx",
  public_id: "sample_document.docx",
  resource_type: 'raw', 
  raw_convert: 'aspose')

|php_2
$cloudinary->uploadApi()->upload("my_file_name.docx",[
   "public_id" => "sample_document.docx",
   "resource_type" => "raw",
   "raw_convert" => "aspose"]);

|python
cloudinary.uploader.upload("my_file_name.docx",
  public_id = "sample_document.docx",
  resource_type = "raw",
  raw_convert = "aspose")

|nodejs
cloudinary.v2.uploader
.upload("my_file_name.docx",
  { public_id: "sample_document.docx",
    resource_type: "raw",
    raw_convert: "aspose" })
.then(result=>console.log(result)); 

|java
cloudinary.uploader().upload("my_file_name.docx", 
  ObjectUtils.asMap(
    "public_id", "sample_document.docx",
    "resource_type", "raw",
    "raw_convert", "aspose"));

|csharp
var uploadParams = new RawUploadParams(){
  File = new FileDescription(@"my_file_name.docx"),
  PublicId = "sample_document.docx",
  RawConvert = "aspose"};
var uploadResult = cloudinary.Upload(uploadParams); 

|go
resp, err := cld.Upload.Upload(ctx, "my_file_name.docx", uploader.UploadParams{
    PublicID: "sample_document.docx", 
    ResourceType: "raw", 
    RawConvert: "aspose"})

|android
MediaManager.get().upload("my_file_name.docx")
  .option("public_id", "sample_document.docx")
  .option("resource_type", "raw")
  .option("raw_convert", "aspose").dispatch();

|swift
let params = CLDUploadRequestParams()
  .setRawConvert("aspose")
  .setPublicId("sample_document.docx")
  .setResourceType(.raw)
var mySig = MyFunction(params)  // your own function that returns a signature generated on your backend
params.setSignature(CLDSignature(signature: mySig.signature, timestamp: mySig.timestamp))
let request = cloudinary.createUploader().signedUpload(
  url: "my_file_name.docx", params: params)

|curl
curl https://api.cloudinary.com/v1_1/demo/raw/upload -X POST -F 'file=@/path/to/my_file_name.docx' -F 'public_id=sample_document.docx' -F 'raw_convert=aspose' -F 'timestamp=173719931' -F 'api_key=436464676' -F 'signature=a781d61f86a6f818af'

|cli
cld uploader upload "my_file_name.docx" public_id="sample_document.docx" resource_type="raw" raw_convert="aspose"
```

> **TIP**:
>
> You can use **upload presets** to centrally define a set of upload options including add-on operations to apply, instead of specifying them in each upload call. You can define multiple upload presets, and apply different presets in different upload scenarios. You can create new upload presets in the **Upload Presets** page of the [Console Settings](https://console.cloudinary.com/app/settings/upload/presets) or using the [upload_presets](admin_api#upload_presets) Admin API method. From the **Upload** page of the Console Settings, you can also select default upload presets to use for image, video, and raw API uploads (respectively) as well as default presets for image, video, and raw uploads performed via the Media Library UI. 
> **Learn more**: [Upload presets](upload_presets)

Document conversion using the Aspose add-on is performed asynchronously in the background after the upload call is completed. Therefore, the response of the uploaded request mentions that the Aspose raw convert process is in the `pending` status.

```json
{
 "public_id":"sample_document.docx",
 "version":1393687686,
 "resource_type":"raw",
 "type":"upload",
 "url":"http://res.cloudinary.com/demo/raw/upload/v1399208539/sample_document.docx",
 "info":{"raw_convert":{"aspose":{"status":"pending"}}},
  ...
}
```

As a result of the upload example above, the uploaded Microsoft Office (`raw`) file with the public ID of 'sample_document.docx', is immediately available for delivery as-is using the following CDN URL:

```
https://res.cloudinary.com/demo/raw/upload/sample_document.docx
```

When the Aspose document conversion is completed, a new PDF asset with delivery type `image` is also created in your product environment. The image asset has the same public ID as the uploaded raw document, including the extension: 'sample_document.docx' in the above example. Because it is now an image (PDF), you can transform and deliver the generated image resource in any image format, the same way you would transform any standard image that was uploaded to Cloudinary.

The following sample code creates an HTML image tag with a Cloudinary URL that generates a PNG image of the uploaded Word document. 

![PNG image of the document](https://res.cloudinary.com/demo/image/upload/sample_document.docx.png "width: 200")

```nodejs
cloudinary.image("sample_document.docx.png")
```

```react
new CloudinaryImage("sample_document.docx.png");
```

```vue
new CloudinaryImage("sample_document.docx.png");
```

```angular
new CloudinaryImage("sample_document.docx.png");
```

```js
new CloudinaryImage("sample_document.docx.png");
```

```python
CloudinaryImage("sample_document.docx.png").image()
```

```php
(new ImageTag('sample_document.docx.png'));
```

```java
cloudinary.url().transformation(new Transformation().imageTag("sample_document.docx.png");
```

```ruby
cl_image_tag("sample_document.docx.png")
```

```csharp
cloudinary.Api.UrlImgUp.BuildImageTag("sample_document.docx.png")
```

```dart
cloudinary.image('sample_document.docx.png').transformation(Transformation());
```

```swift
imageView.cldSetImage(cloudinary.createUrl().generate("sample_document.docx.png")!, cloudinary: cloudinary)
```

```android
MediaManager.get().url().transformation(new Transformation().generate("sample_document.docx.png");
```

```flutter
cloudinary.image('sample_document.docx.png').transformation(Transformation());
```

```kotlin
cloudinary.image {
	publicId("sample_document.docx.png") 
}.generate()
```

```jquery
$.cloudinary.image("sample_document.docx.png")
```

```react_native
new CloudinaryImage("sample_document.docx.png");
```

### Converting existing Office files

You can convert previously uploaded Office documents using the [update](admin_api#update_details_of_an_existing_resource) Admin API method while specifying the public ID of a previously uploaded Office file and setting `raw_convert` to `aspose`.

```multi
|ruby
Cloudinary::Api.update("sample_spreadsheet.xls",
  raw_convert: "aspose",
  resource_type: "raw")

|php_2
$api->update("sample_spreadsheet.xls",
  ["raw_convert" => "aspose",
   "resource_type" => "raw"]);

|python
cloudinary.api.update("sample_spreadsheet.xls",
  raw_convert = "aspose",
  resource_type = "raw")

|nodejs
cloudinary.v2.api
.update("sample_spreadsheet.xls",
  { raw_convert: "aspose",
    resource_type: "raw" })
.then(result=>console.log(result));

|java
cloudinary.api().update("sample_spreadsheet.xls", 
  ObjectUtils.asMap(
    "raw_convert", "aspose",
    "resource_type", "raw"));

|csharp
var updateParams = new UpdateParams("sample_spreadsheet.xls"){
  RawConvert = "aspose",
  ResourceType = "raw"};
var updateResult = cloudinary.Update(updateParams); 

|go
resp, err := cld.Admin.UpdateAsset(ctx, admin.UpdateAssetParams{
		PublicID:   "sample_spreadsheet.xls",
		RawConvert: "apose",
		AssetType:  "raw"})

|cli
cld admin update "sample_spreadsheet.xls" raw_convert="aspose" resource_type="raw"

```

## Monitor the webhook notification

The Aspose add-on converts documents asynchronously. The conversion usually takes a few seconds, but the conversion time is dependent on the size and complexity of the converted document. As a result, you may want to get [notified](notifications) when the conversion process is completed.

When calling the `upload` or `update` API with aspose document conversion, you can set the `notification_url` parameter to a public HTTP or HTTPS URL endpoint of your online web application. Cloudinary sends a POST request to the specified endpoint when the document conversion completes.

```multi
|ruby
Cloudinary::Uploader.upload("my_file_name.docx",
  public_id: "sample_document.docx",
  resource_type: 'raw', 
  raw_convert: 'aspose',
  notification_url: "https://mysite.example.com/hooks")

|php_2
$cloudinary->uploadApi()->upload("my_file_name.docx", [
    "public_id" => "sample_document.docx",
    "resource_type" => "raw",
    "raw_convert" => "aspose",
    "notification_url" => "https://mysite.example.com/hooks"]);

|python
cloudinary.uploader.upload("my_file_name.docx",
  public_id = "sample_document.docx",
  resource_type = "raw",
  raw_convert = "aspose",
  notification_url = "https://mysite.example.com/hooks")

|nodejs
cloudinary.uploader
.upload("my_file_name.docx",
  { public_id: "sample_document.docx",
    resource_type: "raw",
    raw_convert: "aspose",
    notification_url: "https://mysite.example.com/hooks" })
.then(result=>console.log(result)); 

|java
cloudinary.uploader().upload("my_file_name.docx", ObjectUtils.asMap(
  "public_id", "sample_document.docx",
  "resource_type", "raw",
  "raw_convert", "aspose",
  "notification_url", "https://mysite.example.com/hooks"));

|csharp
var uploadParams = new RawUploadParams(){
  File = new FileDescription(@"my_file_name.docx"),
  PublicId = "sample_document.docx",
  RawConvert = "aspose",
  NotificationUrl = "https://mysite.example.com/hooks"};
var uploadResult = cloudinary.Upload(uploadParams); 

|go
resp, err := cld.Upload.Upload(ctx, "my_file_name.docx", uploader.UploadParams{
		PublicID:        "sample_document.docx",
		ResourceType:    "raw",
		RawConvert:      "aspose",
		NotificationURL: "https://mysite.example.com/hooks"})

|android
MediaManager.get().upload("my_file_name.docx")
  .option("public_id", "sample_document.docx")
  .option("resource_type", "raw")
  .option("raw_convert", "aspose")
  .option("notification_url", "https://mysite.example.com/hooks").dispatch();

|swift
let params = CLDUploadRequestParams()
  .setRawConvert("aspose")
  .setPublicId("sample_document.docx")
  .setResourceType(.raw)
  .setNotificationUrl("https://mysite.example.com/hooks")
var mySig = MyFunction(params)  // your own function that returns a signature generated on your backend
params.setSignature(CLDSignature(signature: mySig.signature, timestamp: mySig.timestamp))
let request = cloudinary.createUploader().signedUpload(
  url: "my_file_name.docx", params: params)

|curl
curl https://api.cloudinary.com/v1_1/demo/raw/upload -X POST -F 'file=@/path/to/sample_document.docx' -F 'public_id=sample_document.docx' -F 'raw_convert=aspose' -F 'notification_url=https://mysite.example.com/hooks' -F 'timestamp=173719931' -F 'api_key=436464676' -F 'signature=a781d61f86a6f818af'

|cli
cld uploader upload "my_file_name.docx" public_id="sample_document.docx" resource_type="raw" raw_convert="aspose" notification_url="https://mysite.example.com/hooks"
```

The following JSON snippet is an example of a POST request sent to the notification URL when the document conversion is completed:

```json
{
  "notification_type": "info",
  "info_kind": "aspose",
  "info_status": "complete",
  "public_id": "sample_document.docx",
  "uploaded_at": "2014-03-01T15:43:08Z",
  "version": 1393688588,
  "url":
    "https://res.cloudinary.com/demo/raw/upload/v1393688588/sample_document.docx",
  "secure_url":
    "https://res.cloudinary.com/demo/raw/upload/v1393688588/sample_document.docx",
  "etag": "c558a878b3b309d42b8d97c82c6f924d"
}
```

The JSON content is signed using your Cloudinary product environment API secret. For details, see [Verifying notification signatures](notification_signatures)

## Deliver PDFs and images of Office documents

The Aspose add-on automatically converts `raw` Office documents to PDF files. You can deliver the converted PDF as you would any other PDF using Cloudinary's CDN delivery URLs. The following code example returns the PDF delivery URL of the converted Word document.

```multi
|ruby
cloudinary_url("sample_document.docx.pdf")

|php_2
$cloudinary->image("sample_document.docx.pdf" );

|python
cloudinary.CloudinaryImage("sample_document.docx.pdf").build_url()

|nodejs
cloudinary.url("sample_document.docx.pdf");

|java
cloudinary.url().generate("sample_document.docx.pdf");

|csharp
cloudinary.UrlImgUp.BuildUrl("sample_document.docx.pdf");

|go
my_image, err := cld.Image("sample_document.docx.pdf")
url, err := my_image.String()

|android
MediaManager.get().url().generate("sample_document.docx.pdf");

|swift
cloudinary.createUrl().generate("sample_document.docx.pdf")

|cli
cld url "sample_document.docx.pdf"
```

The returned URL: `https://res.cloudinary.com/demo/image/upload/sample_document.docx.pdf`

You can also apply a variety of [transformations on PDF documents](paged_and_layered_media#delivering_content_from_pdf_files). For example, the following code creates an HTML image tag with a dynamic transformation URL that generates a small JPG 'thumbnail' image of the second page (`pg_2`) of the document.

![Page 2 scaled down](https://res.cloudinary.com/demo/image/upload/c_scale,w_300/pg_2/sample_document.docx.jpg)

```nodejs
cloudinary.image("sample_document.docx.jpg", {transformation: [
  {width: 300, crop: "scale"},
  {page: 2}
  ]})
```

```react
new CloudinaryImage("sample_document.docx.jpg")
  .resize(scale().width(300))
  .extract(getPage().byNumber(2));
```

```vue
new CloudinaryImage("sample_document.docx.jpg")
  .resize(scale().width(300))
  .extract(getPage().byNumber(2));
```

```angular
new CloudinaryImage("sample_document.docx.jpg")
  .resize(scale().width(300))
  .extract(getPage().byNumber(2));
```

```js
new CloudinaryImage("sample_document.docx.jpg")
  .resize(scale().width(300))
  .extract(getPage().byNumber(2));
```

```python
CloudinaryImage("sample_document.docx.jpg").image(transformation=[
  {'width': 300, 'crop': "scale"},
  {'page': 2}
  ])
```

```php
(new ImageTag('sample_document.docx.jpg'))
	->resize(Resize::scale()->width(300))
	->extract(Extract::getPage()->byNumber(2));
```

```java
cloudinary.url().transformation(new Transformation()
  .width(300).crop("scale").chain()
  .page(2)).imageTag("sample_document.docx.jpg");
```

```ruby
cl_image_tag("sample_document.docx.jpg", transformation: [
  {width: 300, crop: "scale"},
  {page: 2}
  ])
```

```csharp
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Width(300).Crop("scale").Chain()
  .Page(2)).BuildImageTag("sample_document.docx.jpg")
```

```dart
cloudinary.image('sample_document.docx.jpg').transformation(Transformation()
	.resize(Resize.scale().width(300))
	.extract(Extract.getPage().byNumber(2)));
```

```swift
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setWidth(300).setCrop("scale").chain()
  .setPage(2)).generate("sample_document.docx.jpg")!, cloudinary: cloudinary)
```

```android
MediaManager.get().url().transformation(new Transformation()
  .width(300).crop("scale").chain()
  .page(2)).generate("sample_document.docx.jpg");
```

```flutter
cloudinary.image('sample_document.docx.jpg').transformation(Transformation()
	.resize(Resize.scale().width(300))
	.extract(Extract.getPage().byNumber(2)));
```

```kotlin
cloudinary.image {
	publicId("sample_document.docx.jpg")
	 resize(Resize.scale() { width(300) })
	 extract(Extract.getPage() { byNumber(2) }) 
}.generate()
```

```jquery
$.cloudinary.image("sample_document.docx.jpg", {transformation: [
  {width: 300, crop: "scale"},
  {page: 2}
  ]})
```

```react_native
new CloudinaryImage("sample_document.docx.jpg")
  .resize(scale().width(300))
  .extract(getPage().byNumber(2));
```

> **READING**: :no-icon :title=Important note for free accounts: 

By default, Free accounts are blocked from delivering files in PDF format for security reasons. For details, see [Media delivery](image_delivery_options#blocked_delivery_formats_for_security).

## Apply additional image transformations

Office document conversion using the Aspose add-on can be combined with other image transformation capabilities.

For example, the following code scales down the fourth page of the processed Word document to a width of 300 pixels while rounding its corners, applying the sepia effect and adding a gray background. Then another uploaded image named `aspose_cloud_logo` is added as an overlay. The overlay is resized to a relative width of 90% of the underlying image, positioned 20 pixels from the bottom of the containing image and is made 70% semi transparent.

![PNG of spreadsheet](https://res.cloudinary.com/demo/image/upload/bo_2px_solid_rgb:999,r_50/c_scale,w_300/e_sepia/pg_4/l_aspose_cloud_logo/c_scale,fl_relative,w_0.9/o_70/fl_layer_apply,g_south,y_20/sample_document.docx.jpg)

```nodejs
cloudinary.image("sample_document.docx.jpg", {transformation: [
  {border: "2px_solid_rgb:999", radius: 50},
  {width: 300, crop: "scale"},
  {effect: "sepia"},
  {page: 4},
  {overlay: "aspose_cloud_logo"},
  {flags: "relative", width: "0.9", crop: "scale"},
  {opacity: 70},
  {flags: "layer_apply", gravity: "south", y: 20}
  ]})
```

```react
new CloudinaryImage("sample_document.docx.jpg")
  .border(solid(2, "#999").roundCorners(byRadius(50)))
  .resize(scale().width(300))
  .effect(sepia())
  .extract(getPage().byNumber(4))
  .overlay(
    source(
      image("aspose_cloud_logo").transformation(
        new Transformation()
          .resize(scale().width(0.9).relative())
          .adjust(opacity(70))
      )
    ).position(
      new Position()
        .gravity(compass("south"))
        .offsetY(20)
    )
  );
```

```vue
new CloudinaryImage("sample_document.docx.jpg")
  .border(solid(2, "#999").roundCorners(byRadius(50)))
  .resize(scale().width(300))
  .effect(sepia())
  .extract(getPage().byNumber(4))
  .overlay(
    source(
      image("aspose_cloud_logo").transformation(
        new Transformation()
          .resize(scale().width(0.9).relative())
          .adjust(opacity(70))
      )
    ).position(
      new Position()
        .gravity(compass("south"))
        .offsetY(20)
    )
  );
```

```angular
new CloudinaryImage("sample_document.docx.jpg")
  .border(solid(2, "#999").roundCorners(byRadius(50)))
  .resize(scale().width(300))
  .effect(sepia())
  .extract(getPage().byNumber(4))
  .overlay(
    source(
      image("aspose_cloud_logo").transformation(
        new Transformation()
          .resize(scale().width(0.9).relative())
          .adjust(opacity(70))
      )
    ).position(
      new Position()
        .gravity(compass("south"))
        .offsetY(20)
    )
  );
```

```js
new CloudinaryImage("sample_document.docx.jpg")
  .border(solid(2, "#999").roundCorners(byRadius(50)))
  .resize(scale().width(300))
  .effect(sepia())
  .extract(getPage().byNumber(4))
  .overlay(
    source(
      image("aspose_cloud_logo").transformation(
        new Transformation()
          .resize(scale().width(0.9).relative())
          .adjust(opacity(70))
      )
    ).position(
      new Position()
        .gravity(compass("south"))
        .offsetY(20)
    )
  );
```

```python
CloudinaryImage("sample_document.docx.jpg").image(transformation=[
  {'border': "2px_solid_rgb:999", 'radius': 50},
  {'width': 300, 'crop': "scale"},
  {'effect': "sepia"},
  {'page': 4},
  {'overlay': "aspose_cloud_logo"},
  {'flags': "relative", 'width': "0.9", 'crop': "scale"},
  {'opacity': 70},
  {'flags': "layer_apply", 'gravity': "south", 'y': 20}
  ])
```

```php
(new ImageTag('sample_document.docx.jpg'))
	->border(Border::solid(2,Color::rgb("999"))
	->roundCorners(
	RoundCorners::byRadius(50))
	)
	->resize(Resize::scale()->width(300))
	->effect(Effect::sepia())
	->extract(Extract::getPage()->byNumber(4))
	->overlay(Overlay::source(
	Source::image("aspose_cloud_logo")
	->transformation((new Transformation())
	->resize(Resize::scale()->width(0.9)
	->relative()
	)
	->adjust(Adjust::opacity(70)))
	)
	->position((new Position())
	->gravity(
	Gravity::compass(
	Compass::south()))
->offsetY(20))
	);
```

```java
cloudinary.url().transformation(new Transformation()
  .border("2px_solid_rgb:999").radius(50).chain()
  .width(300).crop("scale").chain()
  .effect("sepia").chain()
  .page(4).chain()
  .overlay(new Layer().publicId("aspose_cloud_logo")).chain()
  .flags("relative").width(0.9).crop("scale").chain()
  .opacity(70).chain()
  .flags("layer_apply").gravity("south").y(20)).imageTag("sample_document.docx.jpg");
```

```ruby
cl_image_tag("sample_document.docx.jpg", transformation: [
  {border: "2px_solid_rgb:999", radius: 50},
  {width: 300, crop: "scale"},
  {effect: "sepia"},
  {page: 4},
  {overlay: "aspose_cloud_logo"},
  {flags: "relative", width: 0.9, crop: "scale"},
  {opacity: 70},
  {flags: "layer_apply", gravity: "south", y: 20}
  ])
```

```csharp
cloudinary.Api.UrlImgUp.Transform(new Transformation()
  .Border("2px_solid_rgb:999").Radius(50).Chain()
  .Width(300).Crop("scale").Chain()
  .Effect("sepia").Chain()
  .Page(4).Chain()
  .Overlay(new Layer().PublicId("aspose_cloud_logo")).Chain()
  .Flags("relative").Width(0.9).Crop("scale").Chain()
  .Opacity(70).Chain()
  .Flags("layer_apply").Gravity("south").Y(20)).BuildImageTag("sample_document.docx.jpg")
```

```dart
cloudinary.image('sample_document.docx.jpg').transformation(Transformation()
	.border(Border.solid(2,Color.rgb("999"))
	.roundCorners(
	RoundCorners.byRadius(50))
	)
	.resize(Resize.scale().width(300))
	.effect(Effect.sepia())
	.extract(Extract.getPage().byNumber(4))
	.overlay(Overlay.source(
	Source.image("aspose_cloud_logo")
	.transformation(new Transformation()
	.resize(Resize.scale().width(0.9)
	.relative()
	)
	.adjust(Adjust.opacity(70)))
	)
	.position(Position()
	.gravity(
	Gravity.compass(
	Compass.south()))
.offsetY(20))
	));
```

```swift
imageView.cldSetImage(cloudinary.createUrl().setTransformation(CLDTransformation()
  .setBorder("2px_solid_rgb:999").setRadius(50).chain()
  .setWidth(300).setCrop("scale").chain()
  .setEffect("sepia").chain()
  .setPage(4).chain()
  .setOverlay("aspose_cloud_logo").chain()
  .setFlags("relative").setWidth(0.9).setCrop("scale").chain()
  .setOpacity(70).chain()
  .setFlags("layer_apply").setGravity("south").setY(20)).generate("sample_document.docx.jpg")!, cloudinary: cloudinary)
```

```android
MediaManager.get().url().transformation(new Transformation()
  .border("2px_solid_rgb:999").radius(50).chain()
  .width(300).crop("scale").chain()
  .effect("sepia").chain()
  .page(4).chain()
  .overlay(new Layer().publicId("aspose_cloud_logo")).chain()
  .flags("relative").width(0.9).crop("scale").chain()
  .opacity(70).chain()
  .flags("layer_apply").gravity("south").y(20)).generate("sample_document.docx.jpg");
```

```flutter
cloudinary.image('sample_document.docx.jpg').transformation(Transformation()
	.addTransformation("bo_2px_solid_rgb:999,r_50/c_scale,w_300/e_sepia/pg_4/l_aspose_cloud_logo/c_scale,fl_relative,w_0.9/o_70/fl_layer_apply,g_south,y_20"));
```

```kotlin
cloudinary.image {
	publicId("sample_document.docx.jpg")
	 border(Border.solid(2,Color.rgb("999")) {
	 roundCorners(
	RoundCorners.byRadius(50))
	 })
	 resize(Resize.scale() { width(300) })
	 effect(Effect.sepia())
	 extract(Extract.getPage() { byNumber(4) })
	 overlay(Overlay.source(
	Source.image("aspose_cloud_logo") {
	 transformation(Transformation {
	 resize(Resize.scale() { width(0.9F)
	 relative()
	 })
	 adjust(Adjust.opacity(70)) })
	 }) {
	 position(Position() {
	 gravity(
	Gravity.compass(
	Compass.south()))
 offsetY(20) })
	 }) 
}.generate()
```

```jquery
$.cloudinary.image("sample_document.docx.jpg", {transformation: [
  {border: "2px_solid_rgb:999", radius: 50},
  {width: 300, crop: "scale"},
  {effect: "sepia"},
  {page: 4},
  {overlay: new cloudinary.Layer().publicId("aspose_cloud_logo")},
  {flags: "relative", width: "0.9", crop: "scale"},
  {opacity: 70},
  {flags: "layer_apply", gravity: "south", y: 20}
  ]})
```

```react_native
new CloudinaryImage("sample_document.docx.jpg")
  .border(solid(2, "#999").roundCorners(byRadius(50)))
  .resize(scale().width(300))
  .effect(sepia())
  .extract(getPage().byNumber(4))
  .overlay(
    source(
      image("aspose_cloud_logo").transformation(
        new Transformation()
          .resize(scale().width(0.9).relative())
          .adjust(opacity(70))
      )
    ).position(
      new Position()
        .gravity(compass("south"))
        .offsetY(20)
    )
  );
```

To learn more about all available image transformation options, see [Image transformations](image_transformations) and the [Transformation URL API Reference](transformation_reference).
