PHPackages                             robbiep/cloudconvert-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. robbiep/cloudconvert-laravel

Abandoned → [cloudconvert/cloudconvert-laravel](/?search=cloudconvert%2Fcloudconvert-laravel)ArchivedLibrary

robbiep/cloudconvert-laravel
============================

A Laravel wrapper for the CloudConvert API

v3.0(6y ago)177184.5k↓50%34[10 issues](https://github.com/robbiepaul/cloudconvert-laravel/issues)[2 PRs](https://github.com/robbiepaul/cloudconvert-laravel/pulls)1MITPHPPHP &gt;=7.2.0

Since Nov 21Pushed 6y ago10 watchersCompare

[ Source](https://github.com/robbiepaul/cloudconvert-laravel)[ Packagist](https://packagist.org/packages/robbiep/cloudconvert-laravel)[ RSS](/packages/robbiep-cloudconvert-laravel/feed)WikiDiscussions 3.x Synced 1mo ago

READMEChangelogDependencies (6)Versions (45)Used By (1)

CloudConvert Laravel API
========================

[](#cloudconvert-laravel-api)

---

**Deprecation warning: I don't have the time to support this package any more please use the [official CloudConvert Laravel package](https://github.com/cloudconvert/cloudconvert-laravel) instead**

---

A Laravel wrapper for the CloudConvert API. See  for more details.

[![Build Status](https://camo.githubusercontent.com/5f594ab18dbb20e99031c6036d8a13ee1e99116f679fa557855c40fc63695d6b/68747470733a2f2f7472617669732d63692e6f72672f726f626269657061756c2f636c6f7564636f6e766572742d6c61726176656c2e7376673f6272616e63683d76302e31)](https://travis-ci.org/robbiepaul/cloudconvert-laravel) [![Latest Stable Version](https://camo.githubusercontent.com/b639bce31ea775d4e0d19c1840fb61e51f36df2afbf7581fed25e855adf1771d/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f636c6f7564636f6e766572742d6c61726176656c2f762f737461626c65)](https://packagist.org/packages/robbiep/cloudconvert-laravel) [![Total Downloads](https://camo.githubusercontent.com/6334855e0f94ac9b375ff065bc81e7d7549e13bc2b7adfa2631f658eaacb559c/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f636c6f7564636f6e766572742d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/robbiep/cloudconvert-laravel) [![Latest Unstable Version](https://camo.githubusercontent.com/8c713e6ddd6016cb7be05639945e87fdc9472cf56ab1be35a83658b52d811fba/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f636c6f7564636f6e766572742d6c61726176656c2f762f756e737461626c65)](https://packagist.org/packages/robbiep/cloudconvert-laravel) [![License](https://camo.githubusercontent.com/a1ed66b7036152a901f0ee53ec4be462434378d2c8a6279423048d726471bd09/68747470733a2f2f706f7365722e707567782e6f72672f726f62626965702f636c6f7564636f6e766572742d6c61726176656c2f6c6963656e7365)](https://packagist.org/packages/robbiep/cloudconvert-laravel)

Installation
------------

[](#installation)

Install this package through [Composer](https://getcomposer.org/).

Add this to your `composer.json` dependencies:

### Using Laravel 5.0+

[](#using-laravel-50)

```
"require": {
   "robbiep/cloudconvert-laravel": "2.*"
}
```

### Using Laravel ~4.2

[](#using-laravel-42)

```
"require": {
   "robbiep/cloudconvert-laravel": "1.*@dev"
}
```

Run `composer install` to download the required files.

Next you need to add the service provider to `config/app.php`

```
'providers' => array(
    ...
    RobbieP\CloudConvertLaravel\CloudConvertLaravelServiceProvider::class
)
```

One more step.

You need to publish the config `php artisan vendor:publish`

Just enter your API key in `config/cloudconvert.php`

> You can get your free API key by registering at

Now you can use CloudConvert in your application!

Usage
-----

[](#usage)

There's many ways to use CloudConvert. I'll cover a few of them here, for all the converter options I suggest checking out the API docs.

### File conversion

[](#file-conversion)

```
# Convert the file to /a/path/to/file.mp4

CloudConvert::file('/a/path/to/file.mov')->to('mp4');
```

```
# Convert the file and save it in a different location /a/new/path/to/new.mp4

CloudConvert::file('/a/path/to/biggles.webm')->to('/a/new/path/to/new.mp4');
```

```
# It also works with Laravel's file upload

if (Input::hasFile('photo'))
{
    CloudConvert::file( Input::file('photo') )->to('/a/local/path/profile_image.jpg');
}
```

```
# Convert the image to kitty.jpg with quality of 70%

CloudConvert::file('kitty.png')->quality(70)->to('jpg');
```

```
# Convert a PowerPoint presentation to a set of images, let's say you only want slides 2 to 4
# This will save presentation-2.jpg, presentation-3.jpg and presentation-4.jpg

CloudConvert::file('presentation.ppt')->pageRange(2, 4)->to('jpg');
```

#### Dynamic file conversion

[](#dynamic-file-conversion)

```
# Dynamic PDF creation using DOCX/PPTX templates
# See this blog post for more details: https://cloudconvert.com/blog/dynamic-pdf-creation-using-docx-templates/

$variables = ['name' => 'John Doe', 'address' => 'Wall Street'];
CloudConvert::file('invoice_template.docx')->templating($variables)->to('invoice.pdf');
```

#### Converter options

[](#converter-options)

There are many more conversion options. I've put shortcuts like the ones above for the most common. However you can pass through any options you like using the `withOptions` method, such as:

```
# Convert the meow.wav to meow.mp3 with a frequecy of 44100 Hz and normalize the audio to +20dB

CloudConvert::file('meow.wav')->withOptions([
    'audio_frequency' => '44100',
    'audio_normalize' => '+20dB'
])->to('mp3');

# Convert the fido_falls_over.mp4 to fido.gif but you only want 10 seconds of it, starting at 1:02

CloudConvert::file('fido_falls_over.mp4')->withOptions([
    'trim_from' => '62',
    'trim_to' => '72'
])->to('fido.gif');

# Or the same with using the shortcuts:
CloudConvert::file('fido_falls_over.mp4')->trimFrom(62)->trimTo(72)->to('fido.gif');
```

#### Chaining multiple conversions

[](#chaining-multiple-conversions)

You can also chain multiple conversions on one process, like this:

```
# Convert a TrueType font in to all the fonts you need for a cross browser web font pack

CloudConvert::file('claw.ttf')->to('eot', true)->to('otf', true)->to('woff', true)->to('svg');

# Or the same thing with an array
CloudConvert::file('claw.ttf')->to(['eot', 'otf', 'woff', 'svg']);
```

#### Remote files

[](#remote-files)

It will also work with converting remote files (just make sure you provide a path to save it to)

```
# Convert Google's SVG logo hosted on Wikipedia to a png on your server

CloudConvert::file('http://upload.wikimedia.org/wikipedia/commons/a/aa/Logo_Google_2013_Official.svg')
            ->to('images/google.png');
```

#### Merging PDFs

[](#merging-pdfs)

At the moment, merging only works with remotely hosted files, however in the future it will work with uploaded files and files from storage

```
# Merge the PDFs in the array in to a single PDF

CloudConvert::merge([
             'https://cloudconvert.com/assets/d04a9878/testfiles/pdfexample1.pdf',
             'https://cloudconvert.com/assets/d04a9878/testfiles/pdfexample2.pdf'
            ])
            ->to('merged.pdf');
```

### Website screenshot

[](#website-screenshot)

CloudConvert will also take a screenshot of a website and convert it to an image or pdf for you:

```
# Take a screenshot with the default options: 1024px with with full height of webpage

CloudConvert::website('www.nyan.cat')->to('screenshots/nyan.jpg');
```

```
# You can also specify the width and the height as converter options

CloudConvert::website('www.nyan.cat')
            ->withOptions([
                 'screen_width' => 1024,
                 'screen_height' => 700
            ])->to('screenshots/nyan.png');
```

### Converting to and from external storage options

[](#converting-to-and-from-external-storage-options)

At the moment CloudConvert let you use *FTP* or *Amazon S3* as storage options. However it looks like in the future they will add *Google Drive* and *Dropbox* to the API

> \*\*Please note: \*\* To use these storage options you will need to provide the configuration in the `config/cloudconvert.php`

```
# Lets say you have a PDF and you want to convert it to an ePub file and
# store it on your Amazon S3 bucket (defined in your config). It's this simple:

CloudConvert::file('/a/local/path/garfield.pdf')->to(CloudConvert::S3('Garfield_converted.epub'));
```

```
# You can also override the default options by providing them as an array as the second argument

CloudConvert::file('/a/local/path/garfield.pdf')
            ->to(CloudConvert::S3('Garfield_converted.epub', [
                'bucket'  => 'a-different-bucket',
                'acl'     => 'public-read',
                'region'  => 'us-east-1'
            ]));
```

```
# Now you want to convert the file on your S3 to a txt file and store it on a server via FTP

CloudConvert::file(CloudConvert::S3('Garfield_converted.epub'))
            ->to(CloudConvert::FTP('path/to/garfield.txt'));
```

It's that simple. The storage options `CloudConvert::S3($path)` and `CloudConvert::FTP($path)` can be used for both input files and output files.

### Non-blocking conversion using a callback URL

[](#non-blocking-conversion-using-a-callback-url)

When the conversion might take a long time you could use:

```
# Script: sendConversion
CloudConvert::file('/a/path/to/file.mov')
            ->callback('http://myserver.com/save_file.php')
            ->convert('mp4');

# Script: saveFile
CloudConvert::useProcess($_REQUEST['url'])
            ->save('/path/converted.mp4');
```

### Non-blocking conversion using a queue

[](#non-blocking-conversion-using-a-queue)

To use queues you will need have set-up either beanstalk or iron in your `config/queue.php`

```
# The queue will check every second if the conversion has finished.
# It times out after 120 seconds (configurable).

CloudConvert::file('/a/path/to/file.mov')->queue('to', '/a/path/to/file.mp4')
```

### Conversion types

[](#conversion-types)

You can view the conversion types using the `conversionTypes()` method. It always returns `Illuminate\Support\Collection`.

```
# To get all possible types

$types = CloudConvert::conversionTypes();
```

```
# To get all possible types in a specific group

$types = CloudConvert::conversionTypes('video');
```

```
# To get all possible output formats if you know the input format

$types = CloudConvert::input('pdf')->conversionTypes();
```

```
# Same if you know the output format and want to see what can be inputted

$types = CloudConvert::output('jpg')->conversionTypes();
```

### Processes status

[](#processes-status)

You may want to list all your processes, running, finished and failed. It always returns a `Illuminate\Support\Collection`.

```
# To get all possible types
$processes = CloudConvert::processes();

# To delete a process by ID
CloudConvert::deleteProcess($process_id);
```

Artisan commands
----------------

[](#artisan-commands)

If you want to do quick conversions or calls to the API from your console, you can use the following commands:

#### Convert a file

[](#convert-a-file)

```
# Options: --opions, --background, --storage, --path
php artisan cloudconvert:convert video.mov mp4
php artisan cloudconvert:convert /path/to/video.mov converted.mp4 --storage='s3'
```

#### Website screenshot

[](#website-screenshot-1)

```
# Options: --opions, --storage, --path
php artisan cloudconvert:website www.laravel.com jpg
```

#### Processes list

[](#processes-list)

```
# Options: --delete (used with process_id)
# Argument: process_id (optional) - will show the status of that process
php artisan cloudconvert:processes
```

#### Conversion types

[](#conversion-types-1)

```
# Options: --input, --output
# (both optional - however if you included both you will see all the
# possible converter options for those types, not just the default ones)
php artisan cloudconvert:types
php artisan cloudconvert:types --input='nice.pdf'
php artisan cloudconvert:types --input='doc' --output='jpg'
```

Using this package without Laravel
----------------------------------

[](#using-this-package-without-laravel)

You still need to use composer. Type `composer require robbiep/cloudconvert-laravel` to download the files, then you can use the package like this:

```
require_once('vendor/autoload.php');

$cloudConvert = new RobbieP\CloudConvertLaravel\CloudConvert(['api_key' => 'API_KEY_HERE']);

$cloudConvert->file('randomuser.jpg')->to('png');
```

Todo
----

[](#todo)

- Release
- Write some more tests
- Enable merging of multiple files
- Enable multiple conversions using one process
- Refactor the commands
- Added support for Guzzle ~6.0
- Readme file is getting long, convert to wiki

Contributing
------------

[](#contributing)

1. Fork it
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request

Credits
-------

[](#credits)

Thanks to [Lunaweb Ltd.](http://www.lunaweb.de/) for their API. Go [check it out](https://cloudconvert.com/page/api).

Resources
---------

[](#resources)

- [API Documentation](https://cloudconvert.com/page/api)
- [Conversion Types](https://cloudconvert.com/formats)
- [CloudConvert Blog](https://cloudconvert.com/blog)

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 89.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~43 days

Recently: every ~268 days

Total

44

Last Release

2305d ago

Major Versions

0.1 → v1.0.12014-11-21

v1.0.3 → v2.0.0-beta2014-11-23

v1.0.4 → v2.0.1-beta2014-11-23

1.x-dev → v2.12015-04-20

2.x-dev → v3.02020-01-16

PHP version history (2 changes)0.1PHP &gt;=5.4.0

v3.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5343505ac3e552740fa206c04cf196df222208ea85cf01ac469dd84dd11af0ac?d=identicon)[robbiepaul](/maintainers/robbiepaul)

---

Top Contributors

[![robbiepaul](https://avatars.githubusercontent.com/u/2804149?v=4)](https://github.com/robbiepaul "robbiepaul (88 commits)")[![slaughter550](https://avatars.githubusercontent.com/u/1266341?v=4)](https://github.com/slaughter550 "slaughter550 (4 commits)")[![edbentinck](https://avatars.githubusercontent.com/u/6202888?v=4)](https://github.com/edbentinck "edbentinck (1 commits)")[![reinierkors](https://avatars.githubusercontent.com/u/1042387?v=4)](https://github.com/reinierkors "reinierkors (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![cesar-Interacpedia](https://avatars.githubusercontent.com/u/20463067?v=4)](https://github.com/cesar-Interacpedia "cesar-Interacpedia (1 commits)")[![vinicius73](https://avatars.githubusercontent.com/u/1561347?v=4)](https://github.com/vinicius73 "vinicius73 (1 commits)")[![denissc](https://avatars.githubusercontent.com/u/10819821?v=4)](https://github.com/denissc "denissc (1 commits)")

---

Tags

laravelconversionofficescreenshotlaravel5laravel4documentscloudconvert

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/robbiep-cloudconvert-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/robbiep-cloudconvert-laravel/health.svg)](https://phpackages.com/packages/robbiep-cloudconvert-laravel)
```

###  Alternatives

[anhskohbo/no-captcha

No CAPTCHA reCAPTCHA For Laravel.

1.8k8.5M33](/packages/anhskohbo-no-captcha)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[laravel-zero/framework

The Laravel Zero Framework.

3371.4M368](/packages/laravel-zero-framework)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
