PDF Operations
Convert to PDF/A
Convert a PDF file to PDF/A-1B, PDF/A-2B or PDF/A-3B. Optionally add a ZUGFeRD invoice XML file.
Task Parameters
pdf/a.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/a", "conformance_level": "2b", "input": "import-my-file" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/a \ --conformance_level=2b \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/a", "conformance_level": "2b", "input": "import-my-file" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/a', 'convert-my-file')) ->set('conformance_level', '2b') ->set('input', 'import-my-file') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/a", "conformance_level": "2b", "input": "import-my-file" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/a', 'conformance_level': '2b', 'input': 'import-my-file' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
Convert to PDF/X
Convert a PDF file to PDF/X-1A, PDF/X-3 or PDF/X-4.
Task Parameters
pdf/x.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/x", "input": "import-my-file", "variant": "4" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/x \ --variant=4 \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/x", "input": "import-my-file", "variant": "4" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/x', 'convert-my-file')) ->set('input', 'import-my-file') ->set('variant', '4') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/x", "input": "import-my-file", "variant": "4" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/x', 'input': 'import-my-file', 'variant': '4' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
PDF OCR
Adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted.
Task Parameters
pdf/ocr.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/ocr", "input": "import-my-file", "language": [ "eng" ] }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/ocr \ --language.0=eng \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/ocr", "input": "import-my-file", "language": [ "eng" ] }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/ocr', 'convert-my-file')) ->set('input', 'import-my-file') ->set('language', ["eng"]) ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/ocr", "input": "import-my-file", "language": [ "eng" ] }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/ocr', 'input': 'import-my-file', 'language': [ 'eng' ] }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
Encrypt PDF
Encrypt a PDF file and optionally set a password. This operation also supports PDF security restrictions.
Task Parameters
pdf/encrypt.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/encrypt", "input": "import-my-file", "set_password": "123", "set_owner_password": "456", "allow_extract": false, "allow_accessibility": true, "allow_modify": "form", "allow_print": "full" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/encrypt \ --set_password=123 \ --set_owner_password=456 \ --allow_extract=false \ --allow_accessibility=true \ --allow_modify=form \ --allow_print=full \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/encrypt", "input": "import-my-file", "set_password": "123", "set_owner_password": "456", "allow_extract": false, "allow_accessibility": true, "allow_modify": "form", "allow_print": "full" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/encrypt', 'convert-my-file')) ->set('input', 'import-my-file') ->set('set_password', '123') ->set('set_owner_password', '456') ->set('allow_extract', false) ->set('allow_accessibility', true) ->set('allow_modify', 'form') ->set('allow_print', 'full') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/encrypt", "input": "import-my-file", "set_password": "123", "set_owner_password": "456", "allow_extract": false, "allow_accessibility": true, "allow_modify": "form", "allow_print": "full" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/encrypt', 'input': 'import-my-file', 'set_password': '123', 'set_owner_password': '456', 'allow_extract': False, 'allow_accessibility': True, 'allow_modify': 'form', 'allow_print': 'full' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
Decrypt PDF
Decrypt a PDF file and remove a password. The password of he PDF file is required to decrypt it.
Task Parameters
pdf/decrypt.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/decrypt", "input": "import-my-file", "password": "123" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/decrypt \ --password=123 \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/decrypt", "input": "import-my-file", "password": "123" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/decrypt', 'convert-my-file')) ->set('input', 'import-my-file') ->set('password', '123') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/decrypt", "input": "import-my-file", "password": "123" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/decrypt', 'input': 'import-my-file', 'password': '123' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
Split PDF Pages
Split a PDF into one PDF file per page.
Task Parameters
pdf/split-pages.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/split-pages", "input": "import-my-file" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/split-pages \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/split-pages", "input": "import-my-file" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/split-pages', 'convert-my-file')) ->set('input', 'import-my-file') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/split-pages", "input": "import-my-file" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/split-pages', 'input': 'import-my-file' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
Exctract PDF Pages
Extract single pages or page ranges from a PDF file into a new PDF file.
Task Parameters
pdf/extract-pages.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/extract-pages", "input": "import-my-file", "pages": "1,2" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/extract-pages \ --pages=1,2 \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/extract-pages", "input": "import-my-file", "pages": "1,2" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/extract-pages', 'convert-my-file')) ->set('input', 'import-my-file') ->set('pages', '1,2') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/extract-pages", "input": "import-my-file", "pages": "1,2" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/extract-pages', 'input': 'import-my-file', 'pages': '1,2' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })
Rotate PDF Pages
Rotate single pages or all pages of a PDF file by a given angle.
Task Parameters
pdf/rotate-pages.Files to perform the operation on
Use a specific engine for the conversion.
Use a specific engine version for the conversion.
Choose a filename (including extension) for the output file.
Timeout in seconds after the task will be cancelled. By default, tasks time out after 5 hours.
Example Job
Using the parameters from above, you can create a job:
POSThttps://api.cloudconvert.com/v2/jobs{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/rotate-pages", "input": "import-my-file", "pages": "1,2", "rotation": "+90" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }
# Install the CloudConvert CLI: npm install -g cloudconvert-cli $ cloudconvert pdf/rotate-pages \ --pages=1,2 \ --rotation=+90 \ zombies.pdf
$ curl -X POST "https://api.cloudconvert.com/v2/jobs" \ -H "Authorization: Bearer API_KEY" \ -H "Content-type: application/json" \ -d '{ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/rotate-pages", "input": "import-my-file", "pages": "1,2", "rotation": "+90" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } }'
use \CloudConvert\CloudConvert; use \CloudConvert\Models\Job; use \CloudConvert\Models\Task; $cloudconvert = new CloudConvert(['api_key' => 'API_KEY']); $job = (new Job()) ->addTask( (new Task('import/url', 'import-my-file')) ->set('url', 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf') ) ->addTask( (new Task('pdf/rotate-pages', 'convert-my-file')) ->set('input', 'import-my-file') ->set('pages', '1,2') ->set('rotation', '+90') ) ->addTask( (new Task('export/url', 'export-my-file')) ->set('input', 'convert-my-file') ); $cloudconvert->jobs()->create($job);
import CloudConvert from 'cloudconvert'; const cloudConvert = new CloudConvert('api_key'); let job = await cloudConvert.jobs.create({ "tasks": { "import-my-file": { "operation": "import/url", "url": "https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf" }, "convert-my-file": { "operation": "pdf/rotate-pages", "input": "import-my-file", "pages": "1,2", "rotation": "+90" }, "export-my-file": { "operation": "export/url", "input": "convert-my-file" } } });
import cloudconvert cloudconvert.configure(api_key='API_KEY') cloudconvert.Job.create(payload={ 'tasks': { 'import-my-file': { 'operation': 'import/url', 'url': 'https://cloudconvert-blog.s3.eu-central-1.amazonaws.com/public/test-files/zombies.pdf' }, 'convert-my-file': { 'operation': 'pdf/rotate-pages', 'input': 'import-my-file', 'pages': '1,2', 'rotation': '+90' }, 'export-my-file': { 'operation': 'export/url', 'input': 'convert-my-file' } } })