}
$p = new $class($_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_POST['format'], $_POST['resolution'], $_POST['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
} else {
- $p = new ProcessToolboxPDFFile($_POST['pdf'], $_POST['out'], $_POST['page'], $_POST['resolutionRatio'], $_POST['mobileRatio'], $_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['withGraphics'], $_POST['withText'], $_POST['version'], $_POST['force']);
}
-die($p->process());
\ No newline at end of file
+$res = $p->process();
+error_log($res);
+die($res);
\ No newline at end of file
--- /dev/null
+<?php
+
+namespace Fluidbook\Farmer;
+
+
+use Cubist\Util\Files\Files;
+
+class Document extends \Cubist\PDF\Document {
+
+ /** @var string */
+ protected $_out;
+
+ public function __construct($in, $out) {
+ $this->_out = $out;
+ parent::__construct($in);
+ }
+
+ public function getConvertPath(): string {
+ return Files::mkdir($this->_out);
+ }
+}
\ No newline at end of file
class ProcessToolboxDocumentFile extends ProcessFile{
public function getOut() {
- $this->getDistantOut();
+ return $this->getDistantOut();
}
public function process() {
- $this->getPath($this->isForce());
+ return $this->getPath($this->isForce());
}
}
\ No newline at end of file
*/
protected $_pdf;
- public function __construct($pdf, $out, $page, $resolutionRatio, $mobileRatio, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) {
+ public function __construct($pdf, $out, $page, $format = 'jpg', $resolution = 150, $withGraphics = true, $withTexts = true, $version = 'html', $force = false) {
$this->setPdf($pdf);
- parent::__construct($out, $page, $resolutionRatio, $mobileRatio, $format, $resolution, $withGraphics, $withTexts, $version, $force);
+ $document = new Document($pdf, $out);
+ parent::__construct($out, $page, $document->getResolutionRatio(), $document->getMobileFirstRatio(), $format, $resolution, $withGraphics, $withTexts, $version, $force);
}
/**
git stash
git pull origin master
chmod 755 /docker/fluidbook-processfarm/app/bin/*
+chmod 755 /docker/fluidbook-processfarm/app/vendor/cubist/pdf/resources/tools/fwstk.sh
chmod 755 /docker/fluidbook-processfarm/ssh
chmod 600 /docker/fluidbook-processfarm/ssh/id_rsa
DOCKER_BUILDKIT=1 docker compose build