use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
+use Illuminate\Queue\Jobs\Job;
use Illuminate\Queue\Jobs\SyncJob;
use Illuminate\Queue\SerializesModels;
use JsonException;
*/
protected $resolutions = [150, 300];
+
public function addSource($document, $start = 1, $pages = null)
{
$source = new Source(new Document($document), $start, $pages);
}
start_measure('Process Fluidbook');
+ // Launch async conversion of pages. Some pages will be processed while the following sync process will attempt other conversion
+ $this->processPages(false);
+ //
$this->processPages($sync);
$this->getTexts();
$this->compileFluidbook();
* @param $dest string
* @param $files ProcessFile[]
* @param false $sync
+ * @return ProcessPage
*/
public function processPage($page, $files, $sync = false)
{
$dispatchFunction = $sync ? 'dispatchSync' : 'dispatch';
- ProcessPage::$dispatchFunction($this, $page, $files);
+ return ProcessPage::$dispatchFunction($this, $page, $files);
}
}