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
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
imm:CreateImageToPDFTask |
create |
*Project
|
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. ` 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:
|
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.