require_once __DIR__ . "/vendor/autoload.php";
+if (!isset($_POST['quality'])) {
+ $_POST['quality'] = 85;
+}
+
if (!isset($_POST['pdf'])) {
if (isset($_POST['toolbox'])) {
$class = ProcessToolboxDocumentFile::class;
} else {
$class = ProcessFile::class;
}
- $p = new $class($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
+ $p = new $class($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], $_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
} else {
- $p = new ProcessToolboxPDFFile($_POST['pdf'], $_POST['out'], $_POST['page'], $_POST['format'], $_POST['resolution'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
+ $p = new ProcessToolboxPDFFile($_POST['pdf'], $_POST['out'], $_POST['page'], $_POST['format'], $_POST['resolution'], $_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
}
$res = $p->process();
die($res);
\ No newline at end of file
protected $filespath;
protected $_job = null;
- public function __construct($out, $page, $resolutionRatio, $mobileRatio, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) {
+ public function __construct($out, $page, $resolutionRatio, $mobileRatio, $format = 'jpg', $resolution = 150, $quality = 85, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) {
if (stristr($out, 'usstorage')) {
$this->setRegion('US');
*/
protected $_pdf;
- public function __construct($pdf, $out, $page, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) {
+ public function __construct($pdf, $out, $page, $format = 'jpg', $resolution = 150, $quality = 85, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) {
$this->setPdf($pdf);
$document = new Document($pdf, $out);
- parent::__construct($out, $page, $document->getResolutionRatio(), $document->getMobileFirstRatio(), $format, $resolution, $withGraphics, $withTexts, $version, $force);
+ parent::__construct($out, $page, $document->getResolutionRatio(), $document->getMobileFirstRatio(), $format, $resolution, $quality, $withGraphics, $withTexts, $version, $force);
}
/**