V 3.5 RC 1

This commit is contained in:
Romain Neutron
2011-12-05 00:23:28 +01:00
parent 6f1ee368aa
commit 4c5b7eb658
5563 changed files with 466984 additions and 985416 deletions

View File

@@ -0,0 +1,55 @@
<?php
/*
* This file is part of Phraseanet
*
* (c) 2005-2010 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package binaryAdapter
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com
*/
class binaryAdapter_document_toPDF_unoconv extends binaryAdapter_processorAbstract
{
/**
*
* @var array
*/
protected $options = array();
/**
*
* @var string
*/
protected $binary_name = 'GV_unoconv';
/**
*
* @param system_file $origine
* @param string $dest
* @return binaryAdapter_document_toPDF_unoconv
*/
protected function process(system_file $origine, $dest)
{
$tmp_file = $this->registry->get('GV_RootPath')
. 'tmp/tmp_doc_' . time()
. mt_rand(10000, 99999) . '.pdf';
$cmd = sprintf('%s --format=pdf --stdout %s > %s'
, $this->binary
, $this->escapeshellargs($origine->getPathname())
, $this->escapeshellargs($dest)
);
$this->shell_cmd($cmd);
return $this;
}
}