aspose/cloud-bundle

This is a symfony2 bundle to use Aspose cloud service in symfony2 applications quickly and easily. Aspose for Cloud is a REST API to work with a number of file formats including word precessing documents, spreadsheets, presentations, PDFs and images.

Installs: 11 622

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

dev-master 2018-10-02 04:45 UTC

This package is not auto-updated.

Last update: 2024-04-13 13:20:20 UTC


README

PHP version

#Aspose Cloud for Symfony

This bundle allows you to work with Aspose Cloud SDK in your Symfony applications

Installation

Add the following lines to your composer.json file:

// composer.json
{
    require: {
        "aspose/cloud-bundle": "~0.3"
    },
    "prefer-stable": true,
}

Install the new dependencies by running composer update from the directory where your composer.json file is located.

Update your AppKernel.php by registering the new bundle:

// app/AppKernel.php
public function registerBundles()
{
    // ...
     new Aspose\Bundle\CloudBundle\AsposeCloudBundle(),
    // ...
);
}

Add you Aspose API key to your config

// app/config/config.yml

aspose_cloud:
    url: http://api.aspose.com/v1.1
    app:
        sid: yoursidhere
        key: yourkeyhere
        outputLocation: "%kernel.cache_dir%/aspose_cloud/" # let the API save files in the cache directory by default

Usage

To configure the initial credentials in the static fields of the AsposeApp, first get it from the container

// Bundle/Controller/DemoController.php
$app = $this->get('aspose.app');

$wordConverter = $this->get('aspose.wordsconverter');
$wordConverter->setFilename($absolutePath)
              ->convert();