Esempio n. 1
0
 /**
  * Set default font size
  *
  * @param int $value
  * @return bool
  */
 public static function setDefaultFontSize($value)
 {
     $value = intval($value);
     if ($value > 0) {
         self::$defaultFontSize = $value;
         return true;
     }
     return false;
 }
Esempio n. 2
0
 /**
  * Set measurement unit
  *
  * @param int|float $value
  * @return bool
  */
 public static function setMeasurementUnit($value)
 {
     $units = array(self::UNIT_TWIP, self::UNIT_CM, self::UNIT_MM, self::UNIT_INCH, self::UNIT_POINT, self::UNIT_PICA);
     if (!in_array($value, $units)) {
         return false;
     }
     self::$measurementUnit = $value;
     return true;
 }