Esempio n. 1
0
 public function render($name = NULL, $dest = NULL)
 {
     // Create Pages
     $this->_render_expenses();
     $this->_render_payments();
     $this->_render_taxpayments();
     return parent::render($name, $dest);
 }
Esempio n. 2
0
 public function action_index()
 {
     // Load the user information
     //  $user = Auth::instance()->get_user();
     $config = array('author' => 'Shanmugan', 'title' => 'Test', 'subject' => 'Pdf', 'name' => Text::random() . '.pdf');
     $name = "Shan";
     View_PDF::factory('welcome/info', $config)->set("name", $name)->render();
     $this->template->content = View::factory('welcome/info')->bind('name', $name);
     // if a user is not logged in, redirect to login page
     //        if (!$user) {
     //            $this->redirect('welcome/login');
     //        }
 }
Esempio n. 3
0
 /**
  * Loads the dompdf options from the Kohana config system
  *
  * @return void
  */
 public static function load_default_options()
 {
     // Only if not initialised
     if (self::$_dompdf_initialised) {
         throw new Exception_DOMPDF_Initialised("Could not load DOMPDF options as DOMPDF has already been initialised");
     }
     if (method_exists('Kohana', 'config')) {
         // Handle KO 3.0 - 3.1
         $options = Kohana::config('dompdf.options');
     } else {
         // Handle KO 3.2 style
         $options = Kohana::$config->load('dompdf.options');
     }
     self::$_options = $options;
 }
Esempio n. 4
0
 /**
  * DOMPDF sets global configuration properties with constants. If you try to
  * set properties after the library has been initialised you'll get an
  * exception.
  *
  * @depends test_dompdf_returns_instance
  * @expectedException Exception_DOMPDF_Initialised
  */
 public function test_setting_options_throws_exception_once_initialised()
 {
     View_PDF::set_dompdf_option(View_PDF::DOMPDF_FONT_CACHE, 'foo');
 }