All Products
Search
Document Center

Intelligent Media Management:CreateImageToPDFTask

Last Updated:Jan 27, 2026

Converts multiple images into a single PDF file and saves the file as a specified OSS object.

Operation description

  • Before using this API, make sure you understand the billing methods and pricing of Intelligent Media Management.

  • Before calling this API, make sure that an active project exists in the current region. For more information, see Project management.

  • This API supports up to 100 input images.

  • This is an asynchronous API. After a task starts, its information is stored for only 7 days and cannot be retrieved after this period. To view task information, call the GetTask or ListTasks API with the returned TaskId. You can also receive task information through asynchronous notification messages by setting the Notification parameter.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

imm:CreateImageToPDFTask

create

*Project

acs:imm:{#regionId}:{#accountId}:project/{#ProjectName}

None None

Request parameters

Parameter

Type

Required

Description

Example

ProjectName

string

Yes

The name of the project. For more information, see Create a project.

test-project

Sources

array<object>

Yes

A list of input images. The images are converted in the order of their URIs in this list.

object

No

The information about an input image.

URI

string

Yes

The OSS address of the source image.

The address must be in the `oss://${Bucket}/${Object}` format. `${Bucket}` must be an OSS bucket in the same region as the project. `${Object}` must be the full path of the file, including its file name extension.

Supported formats: JPG, JP2, PNG, TIFF, WebP, BMP, and SVG.

oss://examplebucket/sampleobject.jpg

Rotate

integer

No

The rotation angle of the image in degrees. Valid values:

  • 0 (default)

  • 90

  • 180

  • 270

90

TargetURI

string

Yes

The OSS address where the output PDF file is stored.

The address must be in the `oss://${bucketname}/${objectname}` format. `${bucketname}` must be an OSS bucket in the same region as the project. `${objectname}` must be the path of the file, including the file name.

oss://examplebucket/outputDocument.pdf

UserData

string

No

Custom user information that is returned in the asynchronous notification message. This helps you associate the notification message with your system. The maximum length is 2048 bytes.

test-data

CredentialConfig CredentialConfig

No

If you have no special requirements, leave this parameter empty.

The chained authorization configuration. For more information, see Use chained authorization to access resources of other entities.

Tags

object

No

Custom tags used to search for and filter asynchronous tasks.

{ "User": "Jane" }

Notification Notification

No

The message notification configuration. For more information, click Notification. For the format of asynchronous notification messages, see Asynchronous notification message format.

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

EC564A9A-BA5C-4499-A087-D9B9E76E*****

EventId

string

The event ID.

0ED-1Bz8z71k5TtsUejT4UJ16Es*****

TaskId

string

The task ID.

ImageToPDF-cbe6ae3e-f8dc-4566-9da7-535d5d*****

Examples

Success response

JSON format

{
  "RequestId": "EC564A9A-BA5C-4499-A087-D9B9E76E*****",
  "EventId": "0ED-1Bz8z71k5TtsUejT4UJ16Es*****",
  "TaskId": "ImageToPDF-cbe6ae3e-f8dc-4566-9da7-535d5d*****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.