sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -p 7554 -o uid=33 -o gid=33 -o allow_other fluidbook@pdfcache.toolbox.fluidbook.com:/data /application/protected/fluidbookpublication/cache/pdffiles
fi
+mkdir -p /application/protected/fluidbookpublication/cache/zoomarea
+if mountpoint -q "/application/protected/fluidbookpublication/cache/zoomarea"; then
+ :
+else
+ sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 -p 7584 -o uid=33 -o gid=33 -o allow_other fluidbook@zoomareacache.toolbox.fluidbook.com:/data /application/protected/fluidbookpublication/cache/zoomarea
+fi
+
mkdir -p /application/protected/fluidbookpublication/working
if mountpoint -q "/application/protected/fluidbookpublication/working"; then
:
$res = PDFOperations::extractHighlightsData($_POST['pdf'], $_POST['out'], $_POST['mode'], $_POST['ignoreseparators']);
} else if ($_POST['operation'] === 'extractmarkdown') {
$res = PDFOperations::extractMarkdown($_POST['pdf'], $_POST['out']);
+ } else if ($_POST['operation'] === 'extractpdfarea') {
+ $res = PDFOperations::extractArea($_POST['pdf'], $_POST['out'],$_POST['page'], $_POST['area'], $_POST['options']);
} else {
if (!isset($_POST['pdf'])) {
if (isset($_POST['toolbox'])) {
use Cubist\PDF\CommandLine\FWSTK;
use Cubist\PDF\PDFTools;
+use Cubist\Util\Graphics\PDF;
class PDFOperations
{
return $out;
}
+ public static function extractArea($pdf, $cache, $page, $rect, $options)
+ {
+ $out = PDF::extractArea(Buffer::getIn($pdf), $page, $rect, null, $options, $cache);
+ Buffer::syncOut();
+ return $out;
+ }
+
}
\ No newline at end of file