Operations

PDF Operations

Convert, optimize and manipulate PDF files

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

operation
string required
Value is pdf/a.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/a jobs.

Convert to PDF/X

Convert a PDF file to PDF/X-1A, PDF/X-3 or PDF/X-4.

Task Parameters

operation
string required
Value is pdf/x.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/x jobs.

PDF OCR

Adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted.

Task Parameters

operation
string required
Value is pdf/ocr.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/ocr jobs.

Encrypt PDF

Encrypt a PDF file and optionally set a password. This operation also supports PDF security restrictions.

Task Parameters

operation
string required
Value is pdf/encrypt.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/encrypt jobs.

Decrypt PDF

Decrypt a PDF file and remove a password. The password of he PDF file is required to decrypt it.

Task Parameters

operation
string required
Value is pdf/decrypt.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/decrypt jobs.

Split PDF Pages

Split a PDF into one PDF file per page.

Task Parameters

operation
string required
Value is pdf/split-pages.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/split-pages jobs.

Exctract PDF Pages

Extract single pages or page ranges from a PDF file into a new PDF file.

Task Parameters

operation
string required
Value is pdf/extract-pages.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/extract-pages jobs.

Rotate PDF Pages

Rotate single pages or all pages of a PDF file by a given angle.

Task Parameters

operation
string required
Value is pdf/rotate-pages.
input
string or array of task names required

Files to perform the operation on

engine
string

Use a specific engine for the conversion.

engine_version
string

Use a specific engine version for the conversion.

filename
string

Choose a filename (including extension) for the output file.

timeout
integer

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"
        }
    }
}
Use the Job Builder to generate and try out pdf/rotate-pages jobs.