public function transacciones()
 {
     $idUser = \Auth::user()->id;
     $cajero = $this->cajero->findByField('idUsuario', $idUser);
     $data = $this->repo->findByField2('id_cajero', $cajero->id);
     return \PDF::loadView('pdf.reporte', compact('data'))->download('reporte_transacciones.pdf');
 }
Пример #2
1
 public function imprimirPase($id)
 {
     if (Session::get('id')) {
         $usuario = $this->usuariosRepo->buscar(Session::get('id'));
     } else {
         $usuario = $this->usuariosRepo->buscar($id);
     }
     if ($usuario->available_pago === 1 && $usuario->available_perfil === 1) {
         $datetime1 = new DateTime('2014-09-17 12:30:00');
         $datetime2 = new DateTime("now");
         // if( $datetime1 > $datetime2 ){
         // 	Session::flash('aviso', 'Su pase podra ser impreso hasta el miercoles 17 de noviembre del 2014 a las 12:30 pm');
         // 	return Redirect::back();
         // }
         $content = $usuario->id . ',' . $usuario->full_name . ',' . $usuario->email;
         DNS2D::getBarcodePngPath('codeqr', $content, "QRCODE", 7, 7, array(91, 139, 205));
         $html = View::make("imprimir/imprimirPase", compact('usuario'));
         return PDF::load($html, 'A4', 'landscape')->show();
     } else {
         // Session::flash('aviso', 'Su pago no a sido registrado o su perfil aun esta incompleto');
         $usuario = [Auth::user()->available_pago, Auth::user()->available_perfil];
         if ($usuario[0] == 0 && $usuario[1] == 0) {
             Session::flash('aviso', 'Debe completar su perfíl');
         } elseif ($usuario[0] == 0 && $usuario[1] == 1) {
             Session::flash('aviso', 'Su pago no ha sido validado. Intente más tarde');
         }
         return Redirect::route('inicio');
     }
 }
Пример #3
1
 public function formarPdf($nombreArchivo, $seleccionar)
 {
     require 'PDF.php';
     $archivo = $nombreArchivo;
     $pdf = new PDF();
     //  $pdf->SetTitle($title);
     $pdf->AddPage();
     foreach ($seleccionar as $valor) {
         $fueNombre = utf8_decode($valor['fueNombre']);
         $notTitulo = utf8_decode($valor['notTitulo']);
         $notContenido = utf8_decode($valor['notContenido']);
         $notAutor = utf8_decode($valor['notAutor']);
         $notEnlace = utf8_decode($valor['notEnlace']);
         $fuenteIgual = strcmp($fueNombre, $fueNombreAnterior);
         if ($fuenteIgual == 0) {
             $mostrarFuente = "";
         } else {
             $mostrarFuente = $fueNombre;
         }
         $fueNombreAnterior = $fueNombre;
         $Fecha = '2016-06-01';
         /* $body=$body.'<br>';
            $body=$body.'<div>';
            $body=$body.'<h2 style="text-align: center; color:#1565c0;"> <u>'.$mostrarFuente.'</u></h2>';
            $body=$body.'<h4 style="text-align: left; color:#1565c0;">'.$notTitulo.'</h4>';
            $body=$body.'<p style="text-align: justify;" >'.$notContenido.'</p>';
            $body=$body.'<br><p style="text-align: justify;" ><small>'.$notAutor.'</small></p>';
            $body=$body.'<p style="text-align: justify;" ><small> <a href="'.$notEnlace.'">'.$notEnlace.'</a></small></p>';
            $body=$body.'</div>';*/
         $pdf->PrintChapter($mostrarFuente, $Fecha, $notTitulo, $notContenido);
     }
     /*$fuente=utf8_decode('Fuente de información');
       $Fecha='2016-06-01';
       $titulo=utf8_decode('Titulo de notica');
       $contenido=utf8_decode('Contenido de noticia');*/
     //$pdf->SetAuthor('Julio Verne');
     /*  $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,$contenido);
         $pdf->PrintChapter($fuente, $Fecha,$titulo,'ultimo');*/
     $pdf->Output();
     //  $pdf->Output($archivo,"f");
 }
Пример #4
0
 /**
  * @return mixed
  */
 public function ticketDownload()
 {
     $name = 'thomas';
     $html = view('mails.report', ['name' => $name])->render();
     return $this->pdf->load($html)->download();
     //		return view('mails.report');
 }
 public function display()
 {
     $order_invoice_list = $this->order->getInvoicesCollection();
     Hook::exec('actionPDFInvoiceRender', array('order_invoice_list' => $order_invoice_list));
     $pdf = new PDF($order_invoice_list, PDF::TEMPLATE_INVOICE, $this->context->smarty);
     $pdf->render();
 }
Пример #6
0
 public function getPDF()
 {
     /*$pdf = new PDF();
       $docentes = Docente::all();
       $columnas = ['NRO','CODIGO','APELLIDOS Y NOMBRES'];
       $pdf->SetFont('Arial','B',13);
       $pdf->AddPage();
       $pdf->Cell(80);
       $pdf->Cell(30,5,'Lista de Docentes',0,1,'C');
       $pdf->SetFont('Arial','B',9);
       $pdf->Ln(2);
       $pdf->SetFont('Arial','B',10);
       $pdf->docentes($columnas,$docentes);
       $cabe=['Content-Type' => 'application/pdf'];
       return Response::make($pdf->_checkoutput(),200,$cabe);*/
     $fpdf = new PDF();
     $docentes = Docente::all();
     $columnas = ['NRO', 'CODIGO', 'APELLIDOS Y NOMBRES'];
     $fpdf->AddPage();
     $fpdf->Cell(80);
     $fpdf->Cell(30, 5, 'Lista de Docentes', 0, 1, 'C');
     $fpdf->SetFont('Arial', 'B', 9);
     $fpdf->Ln(2);
     $fpdf->SetFont('Arial', 'B', 16);
     $fpdf->docentes($columnas, $docentes);
     $fpdf->Output();
     exit;
 }
Пример #7
0
 /**
  * PageHeader element renderer
  *
  * @param PDF $pdf
  *
  * @return void
  */
 function render($pdf)
 {
     $pdf->clearPageHeader();
     foreach ($this->elements as $element) {
         $pdf->addPageHeader($element);
     }
 }
 public function gerarpdfAction()
 {
     $this->_helper->layout->disableLayout();
     $html = $_POST['html'];
     $formato = $_POST['formato'];
     $pdf = new PDF($html, $formato);
     xd($pdf->gerarRelatorio());
 }
Пример #9
0
function Cetak()
{
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Pembayaran Mahasiswa Per Periode");
    $pdf->AddPage();
    $lbr = 190;
    BuatIsinya($_SESSION['TahunID'], $_SESSION['ProdiID'], $pdf);
    $pdf->Output();
}
Пример #10
0
function Cetak()
{
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Rekap Pembayaran Mahasiswa Per Bulan");
    $pdf->AddPage('L', 'Legal');
    $lbr = 190;
    BuatIsinya($_SESSION['TahunID'], $_SESSION['ProdiID'], $pdf);
    $pdf->Output();
}
Пример #11
0
function Cetak()
{
    $TahunID = sqling($_REQUEST['TahunID']);
    $ProdiID = sqling($_REQUEST['ProdiID']);
    $BIPOTNamaID = $_REQUEST['BIPOTNamaID'];
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Laporan Pembayaran Per Akun");
    BuatIsinya($TahunID, $ProdiID, $BIPOTNamaID, $pdf);
    $pdf->Output();
}
function Cetak()
{
    // *** Init PDF
    $pdf = new PDF();
    $pdf->SetTitle("Penjualan Formulir");
    $pdf->AddPage();
    $lbr = 190;
    BuatJudulLaporan($_SESSION['_PMBPeriodID'], $pdf);
    BuatIsinya($_SESSION['_PMBPeriodID'], $pdf);
    $pdf->Output();
}
Пример #13
0
 function relatorioCursoPorPolo()
 {
     $pdf = new PDF("P", "pt", "A4");
     $relatorio = $this->read();
     $cabeçalhoTabela = array('Curso', 'Tipo');
     $polo = "";
     $array = array();
     foreach ($relatorio as $value) {
         if ($polo == "") {
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
         }
         if ($polo != $value->getPolo()->getId()) {
             $pdf->BasicTable($cabeçalhoTabela, $array);
             $array = array();
             $polo = $value->getPolo()->getId();
             $pdf->setVendedor($value->getPolo()->getNome());
             $pdf->AddPage();
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         } else {
             array_push($array, array($value->getNome(), $value->getTipo()['descricao']));
         }
     }
     $pdf->BasicTable($cabeçalhoTabela, $array);
     $pdf->Output();
 }
Пример #14
0
 public function reportView($id)
 {
     $loopID = DB::table('tbl_reservation')->where('batch_id', $id)->get();
     $result = array();
     foreach ($loopID as $batch) {
         $sumRow = DB::table('tbl_reservation')->where('batch_id', $id)->sum('total_amount');
         $data = array('id' => $batch->id, 'name' => $batch->full_name, 'date_to' => $batch->date_time_to, 'date_from' => $batch->date_time_from, 'amount' => $batch->total_amount, 'totalAmt' => $sumRow);
         array_push($result, $data);
     }
     //        dd($result[0]["totalAmt"]);
     $viewMake = View::make('admin.pdf.report_verification')->with('result', $result);
     define('BUDGETS_DIR', public_path('uploads/emailReportDelete'));
     // I define this in a constants.php file
     if (!is_dir(BUDGETS_DIR)) {
         mkdir(BUDGETS_DIR, 0755, true);
     }
     $pdf = new \Thujohn\Pdf\Pdf();
     $pdf->load($viewMake, 'A4', 'portrait')->download('report');
     $pdfPath = BUDGETS_DIR . '/report.pdf';
     File::put($pdfPath, PDF::load($viewMake, 'A4', 'portrait')->output());
     if (File::exists($pdfPath)) {
         File::delete($pdfPath);
     }
     PDF::clear();
 }
Пример #15
0
 /**
  *  This function responses  to the 
  *  post request of the /member/action
  *  then checked which button are pressed in the
  *  form of member dashboard page of the 
  *  route /member
  */
 public function postAction()
 {
     // Holding checked row value from movie table
     if (Input::get('checked')) {
         $id = Input::get('checked');
     } elseif (Input::get('checked1')) {
         $id = Input::get('checked1');
     }
     /**
      *  Redirected route if Details button is pressed
      */
     if (Input::has('Details')) {
         return Redirect::route('member-movie-details-get', $id);
     }
     /**
      *  Redirected route if Print button is pressed
      */
     if (Input::has('Print')) {
         $parameterr = array();
         $parameter['title'] = ucwords(Session::get('username')) . "'s Order";
         $parameter['orders'] = Order::where('member_id', '=', Session::get('member_id'))->orderBy('id', 'desc')->get();
         $pdf = PDF::loadView('reports.order.getAllOrders', $parameter)->setPaper('a4')->setOrientation(config::$MEMBER_REPORT_ORIENTATION)->setWarnings(false);
         return $pdf->download('orders.pdf');
     }
 }
Пример #16
0
 public function getResult($id = 'x')
 {
     $printed = \Request::get('printed');
     $slctd_samples = \Request::has("samples") ? \Request::get("samples") : [];
     $slctd_samples_str = is_array($slctd_samples) ? implode(',', $slctd_samples) : "{$slctd_samples}";
     $sql = "SELECT  s.*, p.artNumber,p.otherID, p.gender, p.dateOfBirth,\n\t\t\t\tGROUP_CONCAT(ph.phone SEPARATOR ',') AS phone, f.facility, d.district, h.hub AS hub_name, \n\t\t\t\tGROUP_CONCAT(res_r.Result, '|||', res_r.created SEPARATOR '::') AS roche_result,\n\t\t\t\tGROUP_CONCAT(res_a.result, '|||', res_a.created SEPARATOR '::') AS abbott_result,\n\t\t\t\tGROUP_CONCAT(res_o.result, '|||', res_o.created SEPARATOR '::') AS override_result,\n\t\t\t\tlog_s.id AS repeated, v.outcome AS verify_outcome, reason.appendix AS rejection_reason,\n\t\t\t\tu.signaturePATH, wk.machineType, fctr.factor, sw.sampleID, sw.worksheetID\n\t\t\t\tFROM vl_samples AS s\n\t\t\t\tLEFT JOIN vl_facilities AS f ON s.facilityID=f.id\n\t\t\t\tLEFT JOIN vl_districts AS d ON f.districtID=d.id\n\t\t\t\tLEFT JOIN vl_hubs AS h ON f.hubID=h.id\n\t\t\t\tLEFT JOIN vl_patients As p ON s.patientID=p.id\n\t\t\t\tLEFT JOIN vl_patients_phone As ph ON p.id = ph.patientID\n\t\t\t\tLEFT JOIN vl_samples_verify AS v ON s.id=v.sampleID\t\t\t\t\n\t\t\t\tLEFT JOIN vl_appendix_samplerejectionreason AS reason ON v.outcomeReasonsID=reason.id\n\t\t\t\tLEFT JOIN vl_samples_worksheet AS sw ON s.id=sw.sampleID\n\t\t\t\tLEFT JOIN vl_samples_worksheetcredentials AS wk ON sw.worksheetID=wk.id\n\t\t\t\tLEFT JOIN vl_results_roche AS res_r ON s.vlSampleID = res_r.SampleID\n\t\t\t\tLEFT JOIN vl_results_abbott AS res_a ON s.vlSampleID = res_a.SampleID\n\t\t\t\tLEFT JOIN vl_results_override AS res_o ON s.vlSampleID = res_o.sampleID\n\t\t\t\tLEFT JOIN vl_logs_samplerepeats AS log_s ON s.id = log_s.sampleID\n\t\t\t\tLEFT JOIN vl_users AS u ON wk.createdby = u.email\n\t\t\t\tLEFT JOIN vl_results_multiplicationfactor AS fctr ON wk.id=fctr.worksheetID\n\t\t\t\tWHERE\n\t\t\t\t";
     if ($id == 'x' and count($slctd_samples) == 0) {
         return "Please select atleast one";
     }
     $sql .= $id != 'x' ? " s.id={$id} LIMIT 1" : " s.id IN ({$slctd_samples_str}) GROUP BY s.id";
     $vldbresult = \DB::connection('live_db')->select($sql);
     if (\Request::has('pdf')) {
         $s_arr = $id != 'x' ? [$id] : explode(",", $slctd_samples_str);
         $sql = "INSERT INTO vl_facility_downloads (sample_id, downloaded_by, downloaded_on) VALUES";
         foreach ($s_arr as $smpl) {
             $sql .= "({$smpl}, '" . \Auth::user()->email . "', '" . date('Y-m-d H:i:s') . "'),";
         }
         $sql = trim($sql, ',');
         \DB::connection('live_db')->unprepared($sql);
         $pdf = \PDF::loadView('results.pdfresults', compact("vldbresult"));
         return $pdf->download('vl_results_' . session('facility') . '.pdf');
         //return \PDF::loadFile('http://www.github.com')->inline('github.pdf');
     }
     return view('results.result', compact("vldbresult", "printed"));
 }
Пример #17
0
 public static function balanceSheet($date)
 {
     $accounts = Account::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('pdf.financials.balancesheet', compact('accounts', 'date', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Balance Sheet.pdf');
 }
Пример #18
0
 public function index()
 {
     $parameter = array();
     $parameter['param'] = "ula mami kit  uii!!";
     $pdf = \PDF::loadView('printView', $parameter);
     return $pdf->download('Curriculum.pdf');
 }
Пример #19
0
 public function __construct($orientation = 'P', $format = "Letter", $color = 'gray')
 {
     parent::__construct($orientation, "pt", $format);
     self::$document_orientation = $orientation;
     self::$document_format = $format;
     $margins = parent::getMargins();
     $this->document_width = parent::getPageWidth() - $margins['left'] - $margins['right'];
     $this->last_width = $margins['left'];
     $this->last_height = $margins['top'];
     $this->document_color = $color;
     if ($color == 'red') {
         parent::SetDrawColorArray(array(255, 128, 128));
     } elseif ($color == 'green') {
         parent::SetDrawColorArray(array(128, 255, 128));
     } elseif ($color == 'blue') {
         parent::SetDrawColorArray(array(128, 128, 255));
     } else {
         parent::SetDrawColorArray(array(128, 128, 128));
     }
     parent::SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     parent::SetAutoPageBreak(true, PDF_MARGIN_BOTTOM);
     parent::setImageScale(PDF_IMAGE_SCALE_RATIO);
     parent::SetHeaderMargin(PDF_MARGIN_HEADER);
     parent::SetFooterMargin(PDF_MARGIN_FOOTER + 10);
 }
Пример #20
0
 public function generatePDF()
 {
     $params = array("email" => Input::get('email'), "id" => Input::get('id'));
     $coupon = $this->generateCoupon($params);
     $pdf = PDF::loadView("coupon_pdf", compact('coupon'));
     return $pdf->download('coupon.pdf');
 }
Пример #21
0
 public function handle()
 {
     date_default_timezone_set("America/Mexico_City");
     $lastweek = Carbon::now()->startOfWeek()->subWeek();
     $startOfWeek = Carbon::now()->startOfWeek()->addDay();
     if ($startOfWeek->isTomorrow() == true) {
         $encuestas = Encuesta::History($lastweek, $startOfWeek)->get();
     } else {
         $encuestas = Encuesta::Reinicio($startOfWeek)->get();
     }
     $pdf = \PDF::loadView('reportes.Clientes', compact('encuestas'))->setOrientation('landscape')->save(public_path() . '/pdfs/' . 'reporte semanal' . '.pdf');
     $ToMail = '*****@*****.**';
     $ToName = 'Victor Zapata';
     $file = public_path() . '/pdfs/' . 'reporte semanal' . '.pdf';
     \Mail::send('emails.Reportes', [], function ($message) use($ToName, $ToMail, $file) {
         //remitente
         $message->from(env('MAIL_FROM'), env('MAIL_NAME'));
         //asunto
         $message->subject('Reporte Semanal Thaigreen');
         //receptor
         $message->to($ToMail, $ToName);
         $message->to('*****@*****.**', 'Mike');
         $message->to('*****@*****.**', $name = null);
         //Adjunto
         $message->attach($file, ['as' => 'Reporte Semanal.PDF']);
     });
     chmod(public_path() . '/pdfs/' . 'reporte semanal.pdf', 0777);
     unlink(public_path() . '/pdfs/' . 'reporte semanal.pdf');
 }
Пример #22
0
 public function getNota($keyTrans = "")
 {
     $data['dataQuery'] = $this->transactionReturn->with('item')->where(['key_transaction' => $keyTrans])->get();
     $data['keyTrans'] = $keyTrans;
     $pdf = \PDF::loadView($this->folder . '.nota', $data);
     return $pdf->stream('invoiceoioiio.pdf');
 }
 public function InDanhSachDeTaiNhom($mahp, $macb)
 {
     $date = date('Y-m-d');
     $nguoiin = DB::table('giang_vien')->where('macb', $macb)->value('hoten');
     //Lấy giá trị năm học và học kỳ hiện tại
     $namht = DB::table('nien_khoa')->distinct()->orderBy('nam', 'desc')->value('nam');
     $hkht = DB::table('nien_khoa')->distinct()->orderBy('hocky', 'desc')->where('nam', $namht)->value('hocky');
     $mank = DB::table('nien_khoa as nk')->join('nhom_hocphan as hp', 'nk.mank', '=', 'hp.mank')->where('nk.nam', $namht)->where('nk.hocky', $hkht)->value('nk.mank');
     $mahp = \Request::segment(3);
     if ($mahp == "all") {
         $gv_hp = DB::table('nhom_hocphan as hp')->select('gv.macb', 'gv.hoten', 'hp.tennhomhp', 'hp.manhomhp')->join('giang_vien as gv', 'gv.macb', '=', 'hp.macb')->where('gv.macb', $macb)->where('hp.mank', $mank)->get();
         //Lấy mảng các mã nhóm HP của cán bộ này ở hk-nk hiện tại
         $ds_hpgv = DB::table('nhom_hocphan as hp')->select('hp.manhomhp')->join('giang_vien as gv', 'gv.macb', '=', 'hp.macb')->where('gv.macb', $macb)->where('hp.mank', $mank)->lists('hp.manhomhp');
         $dssv = DB::table('sinh_vien as sv')->leftjoin('chia_nhom as chn', 'sv.mssv', '=', 'chn.mssv')->leftjoin('ra_de_tai as radt', 'chn.manhomthuchien', '=', 'radt.manhomthuchien')->leftjoin('de_tai as dt', 'radt.madt', '=', 'dt.madt')->whereIn('chn.manhomhp', $ds_hpgv)->orderBy('chn.manhomthuchien', 'asc')->get();
     } else {
         if ($mahp != null) {
             $gv_hp = DB::table('nhom_hocphan as hp')->select('gv.macb', 'gv.hoten', 'hp.tennhomhp')->join('giang_vien as gv', 'gv.macb', '=', 'hp.macb')->where('hp.manhomhp', $mahp)->first();
             $dssv = DB::table('sinh_vien as sv')->leftjoin('chia_nhom as chn', 'sv.mssv', '=', 'chn.mssv')->leftjoin('ra_de_tai as radt', 'chn.manhomthuchien', '=', 'radt.manhomthuchien')->leftjoin('de_tai as dt', 'radt.madt', '=', 'dt.madt')->where('chn.manhomhp', $mahp)->orderBy('chn.manhomthuchien', 'asc')->get();
         }
     }
     $view = \View::make('giangvien.in-danh-sach-de-tai-nhom', compact('macb', 'nguoiin', 'namht', 'hkht', 'gv_hp', 'dssv', 'date', 'mahp'));
     $pdf = \App::make('dompdf.wrapper');
     $pdf = \PDF::loadHTML($view)->setPaper('a4')->setOrientation('landscape');
     return $pdf->stream("DanhSachDeTaiNhom.pdf");
 }
Пример #24
0
 public function pdf()
 {
     // data
     $sekolah = Sekolah::data();
     $kembali = Pengembalian::semua();
     return PDF::loadHTML(View::make('pdf.pengembalian', compact('sekolah', 'kembali')))->setPaper('a4')->download('data pengembalian.pdf');
 }
Пример #25
0
 /**
  * Genera il nuovo tesserino per il socio ordinario sulla base della richiesta
  * @return bool(false)|File     Il tesserino del volontario, o false in caso di fallimento
  */
 public function generaTesserinoOrdinario()
 {
     $utente = $this->utente();
     // Verifica l'assegnazione di un codice al tesserino
     if (!$this->haCodice()) {
         $codice = $this->assegnaCodice();
     } else {
         $codice = $this->codice;
     }
     $f = new PDF('tesseriniordinari', "Tesserino_{$codice}.pdf");
     $f->formato = 'cr80';
     $f->orientamento = ORIENTAMENTO_ORIZZONTALE;
     $f->_NOME = $utente->nome;
     $f->_COGNOME = $utente->cognome;
     $f->_CODICEFISCALE = $utente->codiceFiscale;
     $f->_COMITATO = $utente->unComitato(MEMBRO_ORDINARIO)->locale()->formattato;
     $int = "Croce Rossa Italiana<br />{$utente->unComitato(MEMBRO_ORDINARIO)->locale()->nome}";
     $f->_INTESTAZIONE = $int;
     $socio = 'SOCIA';
     if ($utente->sesso == UOMO) {
         $socio = 'SOCIO';
     }
     $f->_SOCIO = $socio;
     $f->_INGRESSO = $utente->ingresso()->format('d/m/Y');
     $f->_CODICE = $codice;
     $scadenza = $this->timestamp + 5 * ANNO;
     $f->_SCADENZA = date('m/Y', $scadenza);
     $barcode = new Barcode();
     $barcode->genera($codice);
     $f->_BARCODE = $barcode->percorso();
     return $f->salvaFile();
 }
Пример #26
0
 /**
  * Constructor
  *
  * Parses arguments, looks for a command, and hands off command
  * options to another Relic library function.
  */
 public function __construct()
 {
     $this->_parseArgs();
     if (array_key_exists($this->command, $this->commands)) {
         $args = $this->_parseOpts($this->commands[$this->command]['options'], $this->commands[$this->command]['params']);
         switch ($this->command) {
             case 'thumb':
                 Image::thumbnail($args['params']['image'], $args['params']['dst'], $args['options']);
                 break;
             case 'split':
                 PDF::split($args);
                 break;
             case 'metadata':
                 $mime = Mime::mime($args['params']['file']);
                 if (in_array($mime, array('image/jpg', 'image/jpeg', 'image/tiff'))) {
                     $image = new Image($args['params']['file']);
                     $this->prettyPrint($image->exif());
                 } else {
                     if ($mime == 'application/pdf') {
                         $pdf = new PDF($args['params']['file']);
                         $this->prettyPrint($pdf->info);
                     }
                 }
                 break;
             case 'mime':
                 Mime::printMime($args['params']['file']);
                 break;
         }
     } else {
         $this->_usage(false, 'Unknown command.');
         exit(1);
     }
 }
Пример #27
0
 public function getValues($pdf, $code, $unformatedDate)
 {
     //$unformateddate="2016-01";
     $dbOps = new PDFDBOperations();
     $startDate = "'" . $unformatedDate . "-01'";
     $endDate = "'" . $unformatedDate . "-31'";
     if ($code == "") {
         //get data for all suppliers
         try {
             $con = new mysqli($dbOps->servername, $dbOps->username, $dbOps->password, $dbOps->dbname);
             $query = "SELECT * FROM monthly_bill INNER JOIN suppliers ON suppliers.supplier_code = monthly_bill.supp_code WHERE date BETWEEN {$startDate} AND {$endDate}";
             $result = $con->query($query);
             while ($row = mysqli_fetch_array($result)) {
                 PDF::createPage($pdf, $row);
             }
         } catch (mysqli_sql_exception $e) {
             echo "getValues : " . $e;
         }
     } else {
         //get data for perticular supplier
         try {
             $con = new mysqli($dbOps->servername, $dbOps->username, $dbOps->password, $dbOps->dbname);
             $query = "SELECT * FROM monthly_bill INNER JOIN suppliers ON suppliers.supplier_code = monthly_bill.supp_code WHERE supp_code = {$code} AND date BETWEEN {$startDate} AND {$endDate}";
             $result = $con->query($query);
             while ($row = mysqli_fetch_array($result)) {
                 PDF::createPage($pdf, $row);
             }
         } catch (mysqli_sql_exception $e) {
             echo "getValues : " . $e;
         }
     }
 }
 public function exportToPdf()
 {
     $data = DB::table('logbooks')->join('priorities', 'logbooks.priorities_id', '=', 'priorities.id')->join('users', 'logbooks.user_id', '=', 'users.id');
     $fromDate = Input::get('fromDate');
     $toDate = Input::get('toDate');
     $sid = Input::get('sid');
     $oid = Input::get('oid');
     if ($oid == 'all') {
         $opName = "Semua Operator";
     } else {
         if ($oid) {
             $user = User::find($oid);
             $opName = $user->first_name . ' ' . $user->last_name;
             $data->where('logbooks.user_id', '=', $oid);
         }
     }
     if ($sid == 'all') {
         $sName = "Semua Status";
     } else {
         if ($sid) {
             $status = Priorities::find($sid);
             $sName = $status->description;
             $data->where('logbooks.priorities_id', '=', $sid);
         }
     }
     $query = $data->select('logbooks.user_id', 'users.id', 'logbooks.created_at', 'logbooks.title', 'logbooks.deskripsi', 'logbooks.priorities_id', 'priorities.description as priority', 'users.first_name', 'users.last_name')->whereBetween('logbooks.created_at', array($fromDate, $toDate))->orderBy('logbooks.created_at', 'asc');
     $logbook = ['data' => $query->get(), 'fromDate' => $fromDate, 'toDate' => $toDate, 'sName' => $sName, 'opName' => $opName, 'count' => $data->count()];
     // $pdf = View::make('export.pdf', $logbook);
     // return $pdf;
     $pdf = PDF::loadView('export.pdf', $logbook);
     return $pdf->stream();
 }
Пример #29
-9
 public function verCurriculo($id)
 {
     //$resultado="";
     //$userId=\App\Estudante::find($id)->user_id;
     $userId = Auth::user()->estudante->user_id;
     //$estudante=Estudante::all()->where("user_id",$userId);
     //if()
     if ($id == $userId) {
         // echo $id;
         // echo $userId;
         $resultado = User::with(['endereco', 'contacto', 'estudante', 'estudante.curriculo', 'estudante.curriculo.disponibilidade', 'estudante.curriculo.OutraQualificacao', 'estudante.curriculo.referencia', 'estudante.curriculo.HabilitacaoIntelectual', 'estudante.curriculo.habilitacao', 'estudante.curriculo.experiencia', 'estudante.curriculo.Idioma'])->where('id', $userId)->first();
         $parameter = array();
         $parameter['resultado'] = $resultado;
         /* $html=View::make('ApreciarPerfil')->withData($parameter);
                $dompdf=new \DOMPDF();
                $dompdf->set_base_path(public_path().'/Start/css/MeuStyle');//use style exterior
                $dompdf->load_html($html);
                $dompdf->render();
               $dompdf->stream("cv.pdf");
            }*/
         $pdf = \PDF::loadView('ApreciarPerfil', $parameter);
         return $pdf->stream('Curriculum.pdf');
     } else {
         return "nao foi encontrado";
     }
 }
Пример #30
-9
 public function stock()
 {
     $items = Item::all();
     $organization = Organization::find(1);
     $pdf = PDF::loadView('erpreports.stockReport', compact('items', 'organization'))->setPaper('a4')->setOrientation('potrait');
     return $pdf->stream('Stock Report.pdf');
 }