Skip to content
Snippets Groups Projects
Commit 837c6ed5 authored by Georg Ehrke's avatar Georg Ehrke
Browse files

implement pdf preview backend

parent 40597ac9
Branches
No related tags found
Loading
......@@ -14,11 +14,10 @@ class OC_Preview_PDF extends OC_Preview_Provider{
public function getThumbnail($path, $maxX, $maxY, $scalingup,$fileview) {
//create imagick object from pdf
$pdf = new imagick($fileview->getLocalFile($path) . '[0]');
$pdf->setImageFormat('png');
$pdf->setImageFormat('jpg');
//new image object
$image = new \OC_Image();
$image->loadFromFile($fileview->getLocalFile($path));
$image = new \OC_Image($pdf);
//check if image object is valid
if (!$image->valid()) return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment