12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- require dirname(__FILE__) . '/../vendor/autoload.php';
- $secretId = "SECRETID";
- $secretKey = "SECRETKEY";
- $region = "ap-beijing";
- $cosClient = new Qcloud\Cos\Client(
- array(
- 'region' => $region,
- 'schema' => 'https',
- 'credentials'=> array(
- 'secretId' => $secretId ,
- 'secretKey' => $secretKey)));
- try {
- $result = $cosClient->createDocProcessJobs(array(
- 'Bucket' => 'examplebucket-1250000000',
- 'Tag' => 'DocProcess',
- 'QueueId' => 'pd8e422a2ea134165a92f2012ea43****',
- 'Input' => array(
- 'Object' => 'Append功能测试.pdf'
- ),
- 'Operation' => array(
- 'DocProcess' => array(
- 'SrcType' => 'pdf',
- 'TgtType' => 'png',
- 'SheetId' => 0,
- 'StartPage' => 1,
- 'EndPage' => 3,
- 'ImageParams' => '',
- 'DocPassword' => '',
- 'Comments' => 0,
- 'PaperDirection' => 0,
- 'Quality' => 100,
- 'Zoom' => 100,
- ),
- 'Output' => array(
- 'Region' => $region,
- 'Bucket' => 'examplebucket-1250000000',
- 'Object' => 'pic-${Page}.jpg',
- ),
- ),
- ));
-
- print_r($result);
- } catch (\Exception $e) {
-
- echo($e);
- }
|