<?php

class presentPDF extends presentBase {

  public function getPreview($width = 500, $height = 500) {
    $player = $this->viewRoot."plugins/flash/pdfPlayer.swf";
    $path = $this->getViewPath(false).$this->present->getPrPlayername().'.swf';
    return flash_tag($player, $width, $height, array('path'=>$path));
  }

  public function getThumbnail($options) {
    if ($this->present->getPrThumbnail() == 1) return parent::getThumbnail($options);
    return image_tag($this->thumbRoot.'uploads/thumbnails/pdf.jpg', $options);
  }

  public function getSmallThumbnail($options) {
    if ($this->present->getPrThumbnail() == 1) return parent::getSmallThumbnail($options);
    return image_tag($this->thumbRoot.'uploads/thumbnails/pdf-small.gif', $options);
  }
}
