} else {
if (!isset($_POST['pdf'])) {
if (isset($_POST['toolbox'])) {
- $p = new ProcessToolboxDocumentFile($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], (int)$_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
+ $p = new ProcessToolboxDocumentFile($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], (int)$_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['transparent'], $_POST['version'], $_POST['force']);
} else {
- $p = new ProcessFile($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], (int)$_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
+ $p = new ProcessFile($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], (int)$_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['transparent'], $_POST['version'], $_POST['force']);
}
} else {
- $p = new ProcessToolboxPDFFile($_POST['pdf'], $_POST['out'], $_POST['page'], $_POST['format'], $_POST['resolution'], (int)$_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
+ $p = new ProcessToolboxPDFFile($_POST['pdf'], $_POST['out'], $_POST['page'], $_POST['format'], $_POST['resolution'], (int)$_POST['quality'], $_POST['withGraphics'], $_POST['withText'], $_POST['transparent'], $_POST['version'], $_POST['force']);
}
$res = $p->process();
}
namespace Fluidbook\Farmer;
-class ProcessToolboxPDFFile extends ProcessToolboxDocumentFile {
+class ProcessToolboxPDFFile extends ProcessToolboxDocumentFile
+{
- /**
- * @var string
- */
- protected $_pdf;
+ /**
+ * @var string
+ */
+ protected $_pdf;
- 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, $quality, $withGraphics, $withTexts, $version, $force);
- }
+ public function __construct($pdf, $out, $page, $format = 'jpg', $resolution = 150, $quality = 85, $withGraphics = true, $withTexts = true, $transparent = false, $version = 'html', $force = false)
+ {
+ $this->setPdf($pdf);
+ $document = new Document($pdf, $out);
+ parent::__construct($out, $page, $document->getResolutionRatio(), $document->getMobileFirstRatio(), $format, $resolution, $quality, $withGraphics, $withTexts, $transparent, $version, $force);
+ }
- /**
- * @return string
- */
- public function getPdf(): string|null {
- return $this->_pdf;
- }
+ /**
+ * @return string
+ */
+ public function getPdf(): string|null
+ {
+ return $this->_pdf;
+ }
- /**
- * @param string $pdf
- */
- public function setPdf(string $pdf): void {
- $this->_pdf = $pdf;
- }
+ /**
+ * @param string $pdf
+ */
+ public function setPdf(string $pdf): void
+ {
+ $this->_pdf = $pdf;
+ }
}
\ No newline at end of file