]> _ Git - fluidbook_processfarm.git/commitdiff
#7340
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 18 Feb 2025 18:48:38 +0000 (19:48 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Tue, 18 Feb 2025 18:48:38 +0000 (19:48 +0100)
app/process.php
app/src/ProcessToolboxPDFFile.php

index 0f18bff43af69017ec983890fa58147a5b74eb14..9a3e4b1293fec8d169d493f0f3009c56fb376cd0 100644 (file)
@@ -37,12 +37,12 @@ try {
     } 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();
     }
index b3fc5c44ca7aaf6eb242591d6033a208ed4d6844..86471b4c165f0fabc22a895c5602761bdb3cbd13 100644 (file)
@@ -3,30 +3,34 @@
 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