• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP mpdf\Pdf类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中kartik\mpdf\Pdf的典型用法代码示例。如果您正苦于以下问题:PHP Pdf类的具体用法?PHP Pdf怎么用?PHP Pdf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Pdf类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: actionItogovyj

    public function actionItogovyj()
    {
        if (isset($_GET['vp']) and $vremya_provedeniya = $_GET['vp'] and isset($_GET['d']) and $dolzhnost = $_GET['d']) {
            $data = \Yii::$app->db->createCommand('select *
                             from attestaciya_itogovij_otchet(:vp,:d)
                             order by  case when otraslevoe_soglashenie is null then 0 else 1 end desc,
                              na_kategoriyu DESC,
                              imeushayasya_kategoriya DESC,
                              attestaciya_data_prisvoeniya DESC,
                              fio')->bindValue(':vp', $vremya_provedeniya)->bindValue(':d', $dolzhnost)->queryAll();
            $groups = ['otraslevoe_soglashenie' => []];
            foreach ($data as $item) {
                if ($item['na_kategoriyu'] == KategoriyaPedRabotnika::VYSSHAYA_KATEGORIYA and $item['otraslevoe_soglashenie']) {
                    $groups['otraslevoe_soglashenie'][] = $item;
                } else {
                    $groups[$item['na_kategoriyu']][] = $item;
                }
            }
            $data = $groups;
            $content = $this->renderPartial('itogovyj-report', compact('data'));
            $indent = 3;
            $css = '
                body{
                   font-family:"Times New Roman","serif";
                }
                .paragraph{
                    text-align:justify;
                    margin-bottom: 5px;
                    margin-top: 5px;
                }
                .center{
                 text-align:center;
                }
                .tb {border-collapse: collapse}
                .tb td {padding: 5px;border: 1px solid #000}
                .inline-block{
                    display: inline-block;
                }
                .indent{padding-left: ' . $indent . 'em}

                .double-indent{padding-left: ' . 2 * $indent . 'em}

                .indent-block{
                    margin-left: ' . $indent . 'em;
                }
                .bold{
                    font-weight: bold;
                }
                ';
            $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_LANDSCAPE, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => $css, 'options' => ['title' => 'Отчет для к заседанию комиссии'], 'methods' => ['SetFooter' => ['']]]);
            // return the pdf output as per the destination setting
            return $pdf->render();
        } else {
            $dolzhnosti = Dolzhnost::getDolzhnostiAttestacii();
            return $this->render('itogovyj', compact('dolzhnosti'));
        }
    }
开发者ID:tsyrya,项目名称:mybriop,代码行数:57,代码来源:ListController.php


示例2: actionReport3

 public function actionReport3()
 {
     $content = $this->renderPartial('_report');
     // setup kartik\mpdf\Pdf component
     $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@backend/web/css/kv-mpdf-bootstrap.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Krajee Report Title'], 'methods' => ['SetHeader' => ['ทดลองการใช้ PDF ด้วย mpdf'], 'SetFooter' => ['{PAGENO}']]]);
     // return the pdf output as per the destination setting
     return $pdf->render();
     //return $this->render('report3');
 }
开发者ID:WittayaSi,项目名称:yii2-tak,代码行数:9,代码来源:ReportController.php


示例3: actionGenHandler

 public function actionGenHandler()
 {
     $num = $_POST['num'];
     $type = $_POST['type'];
     $arr_no = [];
     for ($i = 0; $i < $num; $i++) {
         $no = Util::next($type);
         if ($no >= 10 && $no < 100) {
             $no = '0' . $no;
         } else {
             if ($no < 10) {
                 $no = '00' . $no;
             }
         }
         $no = $type . $no;
         $arr_no[] = $no;
         $card = new Card();
         $card->no = $no;
         $card->type = $type;
         $card->status = 'A';
         $card->create_dt = date('Y-m-d');
         $card->create_by = \Yii::$app->user->id;
         $card->save();
         $this->genBarCode($no);
     }
     $ty = Ref::getDesc('ctype', $type);
     $content = $this->renderPartial('daily_card', ['arr_no' => $arr_no, 'type' => $ty]);
     $pdf = new Pdf(['content' => $content, 'orientation' => Pdf::ORIENT_PORTRAIT, 'cssFile' => 'css/card.css', 'marginLeft' => 5, 'marginRight' => 5]);
     $pdf->render();
 }
开发者ID:azman1204,项目名称:vms,代码行数:30,代码来源:CardController.php


示例4: attachFile

 public function attachFile()
 {
     try {
         $model = $this->owner;
         $fileName = Inflector::slug($model->fullAddress) . '.pdf';
         $folder = $this->getModelSubDir() . '/';
         $model->pdf_path = $fileName;
         $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'destination' => Pdf::DEST_FILE, 'content' => Yii::$app->view->render('@frontend/views/site/real-estate/print', ['model' => $model]), 'methods' => ['SetHeader' => ['Rapport ' . $model->fullAddress], 'SetFooter' => ['|Pagina {PAGENO}|']], 'filename' => Yii::getAlias('@uploadsBasePath') . "/files/{$folder}{$fileName}"]);
         $this->file = $pdf;
         BaseFileHelper::removeDirectory(Yii::getAlias('@uploadsBasePath') . "/files/{$folder}");
         if (!BaseFileHelper::createDirectory(Yii::getAlias('@uploadsBasePath') . "/files/{$folder}")) {
             throw new Exception(Yii::t('app', 'Failed to create the file upload directory'));
         }
         // Save and update model
         $pdf->render();
         $model->save();
         return true;
     } catch (yii\base\Exception $e) {
         return $e->getMessage();
     }
 }
开发者ID:rocketyang,项目名称:yii2-cms,代码行数:21,代码来源:PdfBehave.php


示例5: actionExportar

 public function actionExportar()
 {
     // get your HTML raw content without any layouts or scripts
     if (isset($_COOKIE['pcbuilder_cart'])) {
         $total = 0;
         $pcbuilder_cart = unserialize($_COOKIE['pcbuilder_cart']);
         if (count($pcbuilder_cart) > 0) {
             $pcbuilder_cart = Yii::$app->PCBuilder->array_sort($pcbuilder_cart, 'categoria', 'SORT_ASC');
             foreach ($pcbuilder_cart as $i => $peca) {
                 $modelPeca = Pecas::findOne($peca['peca']);
                 $pecas[] = ['id' => $modelPeca['id'], 'cookieID' => $i, 'nome' => $modelPeca['nome'], 'loja' => $modelPeca['loja'], 'link_externo' => $modelPeca['link_externo'], 'preco' => $modelPeca['preco'][0]['preco']];
                 $total = $total + $modelPeca['preco'][0]['preco'];
             }
         }
     } else {
         echo "Nada para salvar!";
         exit;
     }
     if (count($pecas) > 0) {
         $content = $this->renderPartial('_pdf', ['pecas' => $pecas, 'total' => $total]);
         $date = new \Datetime(null);
         $hoje = $date->getTimestamp() + $date->getOffset();
         // setup kartik\mpdf\Pdf component
         $pdf = new Pdf(['mode' => Pdf::MODE_BLANK, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_DOWNLOAD, 'content' => $content, 'filename' => 'PC Builder - Lista de Peças - ' . date("d.m.Y H.i.s", $hoje) . '.pdf', 'options' => ['title' => 'PC Builder - Lista de Peças - ' . date("d/m/Y H:i:s", $hoje), 'defaultheaderline' => 0, 'setAutoTopMargin' => 'stretch'], 'methods' => ['SetHeader' => ['' . '<table width="100%">' . '<tr>' . '<td width="75%"><a target="_blank" href="http://www.brunodeoliveira.com"><img width="100px" src="imgs/logo.png"></a></td>' . '<td width="25%" valign="bottom" style="text-align: right">Salvo em<br /><small>' . date("d/m/Y H:i:s") . '</small></td>' . '<tr/>' . '</table>' . ''], 'SetFooter' => ['Obrigado por utilizar o PC Builder - Desenvolvido por Bruno de Oliveira - Página {PAGENO}']]]);
         return $pdf->render();
     }
 }
开发者ID:brunofunny,项目名称:pcbuilder,代码行数:27,代码来源:ConstruirController.php


示例6: actionReport

 /**
  * @return mixed
  */
 public function actionReport()
 {
     // get your HTML raw content without any layouts or scripts
     $content = $this->render('index');
     // setup kartik\mpdf\Pdf component
     $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'format' => Pdf::FORMAT_LETTER, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Krajee Report Title'], 'methods' => ['SetHeader' => ['Krajee Report Header'], 'SetFooter' => ['{PAGENO}']]]);
     // return the pdf output as per the destination setting
     return $pdf->render();
 }
开发者ID:RomarioLopezC,项目名称:RobotSS,代码行数:12,代码来源:DefaultController.php


示例7: actionImprimir

 public function actionImprimir()
 {
     // get your HTML raw content without any layouts or scrip
     $Proyectos = Proyectos::find()->all();
     $content = $this->renderPartial('_imprimir', ['Proyectos' => $Proyectos]);
     $header = $this->renderPartial('_header', ['Proyectos' => $Proyectos]);
     $pdf = new Pdf(['format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Krajee Report Title'], 'methods' => ['SetHeader' => $header, 'SetFooter' => ['{PAGENO}']]]);
     // return the pdf output as per the destination setting
     return $pdf->render();
 }
开发者ID:rzamarripa,项目名称:du,代码行数:10,代码来源:ProyectosController.php


示例8: actionReport

 public function actionReport($id)
 {
     // get your HTML raw content without any layouts or scripts
     $model = Inventory::find()->where(['id' => $id])->one();
     $content = $this->renderPartial('_reportView', ['model' => $model]);
     // setup kartik\mpdf\Pdf component
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Krajee Report Title'], 'methods' => []]);
     // return the pdf output as per the destination setting
     return $pdf->render();
 }
开发者ID:patjawat,项目名称:inventory,代码行数:10,代码来源:SiteController.php


示例9: actionPrint

 public function actionPrint($id)
 {
     $model = $this->findModel($id);
     $multimediaProvider = new ArrayDataProvider(['allModels' => Multimedia::findAll(['objetos_id' => $model->id])]);
     //        $this->render('print', [
     //            'model' => $model,
     //            'dataProvider' => $multimediaProvider,
     //        ]);
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '* {font-size:14px}', 'content' => $this->renderPartial('print', ['model' => $model, 'dataProvider' => $multimediaProvider]), 'options' => ['title' => 'Acervo'], 'methods' => ['SetHeader' => ['Gestión de Colecciones'], 'SetFooter' => ['|Página {PAGENO}|']]]);
     return $pdf->render();
 }
开发者ID:DiegoRodriguezTandil,项目名称:MoisesVille,代码行数:11,代码来源:AcervoController.php


示例10: actionPrint

 public function actionPrint($id)
 {
     $m = $this->findModel($id);
     $acervos = $this->getObjectsProvider($m);
     //        return $this->render('print', [
     //            'model' => $m,
     //            'acervos' => $acervos,
     //        ]);
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '* {font-size:14px}', 'content' => $this->renderPartial('print', ['model' => $m, 'acervos' => $acervos]), 'options' => ['title' => 'Ingreso', 'subject' => 'Generating PDF files via yii2-mpdf extension has never been easy'], 'methods' => ['SetHeader' => ['Gestión de Colecciones -' . date("d-M-y")], 'SetFooter' => ['|Página {PAGENO}|']]]);
     return $pdf->render();
 }
开发者ID:DiegoRodriguezTandil,项目名称:MoisesVille,代码行数:11,代码来源:IngresoController.php


示例11: actionView

 /**
  * Displays a single Landing model.
  */
 public function actionView($landing_code)
 {
     //echo '<br><br><br><br><br>'.$example_code;
     if ($attr = Yii::$app->request->get('attr')) {
         if ($attr == 'pdf') {
             // get your HTML raw content without any layouts or scripts
             $content = $this->renderPartial('view', ['model' => $this->findModel($id)]);
             // setup kartik\mpdf\Pdf component
             $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'format' => Pdf::FORMAT_A4, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/bootstrap.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Сайт в pdf'], 'methods' => ['SetHeader' => ['Лендинг "Разработка сайтов"'], 'SetFooter' => ['{PAGENO}']]]);
             //die($pdf->cssFile);
             // return the pdf output as per the destination setting
             return $pdf->render();
         }
     }
     return $this->render('view', ['model' => $this->findCodeModel($landing_code)]);
 }
开发者ID:GalkinDmitriy,项目名称:evalotta,代码行数:19,代码来源:LandingController.php


示例12: actionPdf

 public function actionPdf($id)
 {
     $model = $this->findModel($id);
     $content = $this->renderPartial('_cuenta_de_cobro', ['model' => $model]);
     $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'format' => Pdf::FORMAT_LETTER, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => 'css/cuenta.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Cuenta De Cobro'], 'methods' => ['SetHeader' => ['Elaborado desde areconsultoria.com.co || SIGER APP  '], 'SetFooter' => ['{PAGENO}']], 'filename' => "CC " . strtoupper($model->idTercero->nombre) . " - " . $model->id_cuenta]);
     // return the pdf output as per the destination setting
     return $pdf->render();
 }
开发者ID:jmcaro,项目名称:sigerapp,代码行数:8,代码来源:CuentasController.php


示例13: actionIndex

    public function actionIndex()
    {
        $content = $this->renderPartial('index');
        // setup kartik\mpdf\Pdf component
        $pdf = new Pdf(['mode' => Pdf::MODE_UTF8, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'marginTop' => 10, 'marginLeft' => 15, 'marginRight' => 15, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.css', 'cssInline' => '
              body{
                font-family:"garuda", "sans-serif";
                font-size:14px;
              }
                    p{
                    font-size:10px;
                    line-height: 4px;
                    }
                    #wrapper{

                    width: 210.5mm;
                    height: 150mm;
                    margin: 0px;
                }
                #header{
                height: 25mm;
                }
                #header p{
                    margin-bottom: 0px;
                }
                .row1{
                height: 50%
                margin: 0px;
                }
                .row2{
                height: 50%
                margin: 0px;
                background-color: yellow;
                }


            ', 'options' => ['title' => ''], 'methods' => []]);
        // return the pdf output as per the destination setting
        return $pdf->render();
    }
开发者ID:phisithos,项目名称:yii2-workshop-co-sapce,代码行数:40,代码来源:ReportController.php


示例14: actionView

 /**
  * Displays a single Przedmiot model.
  * @param integer $id
  * @param integer $kierunekStudiow_id
  * @param integer $user_id
  * @return mixed
  */
 public function actionView($id, $kodKursu, $wymaganie, $nazwaPolska, $nazwaAngielska, $kierunekStudiow_id, $published, $user_id, $grupaKursow, $litPodstawowa, $litUzupelniajaca, $kierunekNazwa, $kierunekSpec, $kierunekStopien, $userName, $userSurname, $userEmail, $forma, $rodzaj)
 {
     $kursy = Kurs::find()->where(['przedmiot_id' => $id])->AsArray()->all();
     $cele = CelKP::find()->where(['przedmiot_id' => $id])->AsArray()->all();
     $peki = Pek::find()->where(['przedmiot_id' => $id])->AsArray()->all();
     $tresci = TresciProgramowe::find()->where(['przedmiot_id' => $id])->AsArray()->all();
     $narzedzia = NarzedziaDydaktyczne::find()->where(['przedmiot_id' => $id])->AsArray()->all();
     $oceny = Ocena::find()->where(['przedmiot_id' => $id])->all();
     $content = $this->renderPartial('viewPdf', ['id' => $id, 'kodKursu' => $kodKursu, 'wymaganie' => $wymaganie, 'nazwaPolska' => $nazwaPolska, 'nazwaAngielska' => $nazwaAngielska, 'kierunekStudiow_id' => $kierunekStudiow_id, 'published' => $published, 'user_id' => $user_id, 'grupaKursow' => $grupaKursow, 'litPodstawowa' => $litPodstawowa, 'litUzupelniajaca' => $litUzupelniajaca, 'kierunekNazwa' => $kierunekNazwa, 'kierunekSpec' => $kierunekSpec, 'kierunekStopien' => $kierunekStopien, 'kursy' => $kursy, 'cele' => $cele, 'peki' => $peki, 'tresci' => $tresci, 'narzedzia' => $narzedzia, 'userName' => $userName, 'userSurname' => $userSurname, 'userEmail' => $userEmail, 'oceny' => $oceny, 'forma' => $forma, 'rodzaj' => $rodzaj]);
     // setup kartik\mpdf\Pdf component
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'Krajee Report Title'], 'methods' => ['SetHeader' => ['Krajee Report Header'], 'SetFooter' => ['{PAGENO}']]]);
     // return the pdf output as per the destination setting
     return $pdf->render();
 }
开发者ID:michal-cierczek,项目名称:psi,代码行数:21,代码来源:PrzedmiotController.php


示例15: dirname

<?php

use kartik\mpdf\Pdf;
$params = (require __DIR__ . '/params.php');
$config = ['id' => 'basic', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log'], 'components' => ['pdf' => ['class' => Pdf::classname(), 'format' => Pdf::FORMAT_A4, 'filename' => 'Contrato_empresa.pdf', 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'mode' => Pdf::MODE_CORE, 'options' => ['title' => 'Contratos Generados por Evnt Manager', 'subject' => 'Generating PDF files via yii2-mpdf extension has never been easy'], 'methods' => ['SetHeader' => ['El nombre de su empresa||Fecha de creación: ' . date("r")], 'SetFooter' => ['|Page {PAGENO}|']]], 'request' => ['cookieValidationKey' => 'LGXkWvibdS1IrlARgmP2YF1AJUKUdI6b'], 'cache' => ['class' => 'yii\\caching\\FileCache'], 'errorHandler' => ['errorAction' => 'site/error'], 'mailer' => ['class' => 'yii\\swiftmailer\\Mailer', 'viewPath' => '@app/mailer', 'useFileTransport' => false, 'transport' => ['class' => 'Swift_SmtpTransport', 'host' => 'smtp.gmail.com', 'username' => '[email protected]', 'password' => '266972319450', 'port' => '587', 'encryption' => 'tls']], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'db' => require __DIR__ . '/db.php'], 'modules' => ['user' => ['class' => 'dektrium\\user\\Module', 'enableUnconfirmedLogin' => true, 'confirmWithin' => 21600, 'cost' => 12, 'admins' => ['admin']]], 'params' => $params];
if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = ['class' => 'yii\\debug\\Module'];
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = ['class' => 'yii\\gii\\Module'];
}
return $config;
开发者ID:godzukison,项目名称:PROYECTOFINALDESARROLLO,代码行数:13,代码来源:web.php


示例16: actionPromissoria2

 public function actionPromissoria2($id, $idvenda)
 {
     //Criação de objetos para a geração do relatório
     $model = Cliente::findOne($id);
     $model2 = Venda::findOne($idvenda);
     //Adicionado Promissoria
     $searchModel2 = new VendaSearch();
     $searchModel2->cliente_idcliente = $id;
     $dataProvider2 = $searchModel2->search(Yii::$app->request->queryParams);
     $content = $this->renderPartial('promissoria', ['model' => $model, 'model2' => $model2, 'dataProvider2' => $dataProvider2]);
     $pdf = new Pdf(['format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:18px}', 'options' => ['title' => 'SGO - Nota Promissória - Cliente'], 'methods' => ['SetHeader' => ['SGO - Nota Promissória - Cliente'], 'SetFooter' => ['{PAGENO}']]]);
     return $pdf->render();
 }
开发者ID:alissoncti,项目名称:sgo,代码行数:13,代码来源:RelatoriosController.php


示例17: actionImprimir

 public function actionImprimir($id)
 {
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'content' => $this->renderPartial('imprimir'), 'options' => ['title' => 'Recrutamento e Seleção - Senac AM'], 'methods' => ['SetHeader' => ['SOLICITAÇÃO DE CONTRATAÇÃO - SENAC AM||Gerado em: ' . date("d/m/Y - H:i:s")], 'SetFooter' => ['Recrutamento e Seleção - GRH||Página {PAGENO}']]]);
     return $pdf->render('imprimir', ['model' => $this->findModel($id)]);
 }
开发者ID:FernandoMauricio,项目名称:processos_seletivos,代码行数:5,代码来源:ContratacaoPendenteController.php


示例18: actionPrintRaspisanie

 public function actionPrintRaspisanie()
 {
     if (!isset($_GET['kurs'])) {
         throw new ErrorException('Kurs is required');
     }
     $kurs_id = $_GET['kurs'];
     $schedule = [];
     $sql = 'select
                 z.data,
                 z.nomer,
                 t.nazvanie as tema,
                 z.forma,
                 fl.familiya,
                 fl.imya,
                 fl.otchestvo,
                 a.nazvanie as auditoriya,
                 rpt.nazvanie as tip_rabot
             from zanyatie as z
             inner join zanyatie_chasti_temy as zct on z.id = zct.zanyatie
             inner join tema as t on zct.tema = t.id
             inner join podrazdel_kursa as pk on t.podrazdel = pk.id
             inner join razdel_kursa as rk on pk.razdel = rk.id
             inner join auditoriya as a on z.auditoriya = a.id
             inner join fiz_lico as fl on z.prepodavatel = fl.id
             inner join rabota_po_teme as rpt on t.tip_raboty = rpt.id
             where rk.kurs = :kurs_id
             order by z.data, z.nomer';
     $data = Yii::$app->db->createCommand($sql)->bindValue(':kurs_id', $kurs_id)->queryAll();
     foreach ($data as $item) {
         if (!isset($schedule[$item['data']])) {
             $schedule[$item['data']] = [];
         }
         $schedule[$item['data']][] = $item;
     }
     $kurs = \app\records\Kurs::findOne($kurs_id);
     $content = $this->renderPartial('/pdf/raspisanie.php', ['kurs' => $kurs, 'schedule' => $schedule]);
     $pdf = new Pdf($this->getPdfSeetings($content, 'Расписание курса "' . $kurs->nazvanie . '"'));
     // return the pdf output as per the destination setting
     return $pdf->render();
 }
开发者ID:agarb7,项目名称:mybriop,代码行数:40,代码来源:ZanyatieController.php


示例19: actionCetakpdf

 /**
  * Cetak PDF Approvad
  * @param string $id
  * @return mixed
  * @author ptrnov  <[email protected]>
  * @since 1.1
  */
 public function actionCetakpdf($kd, $v)
 {
     $dinasHeader = Salesorder::find()->where(['KD_SA' => $kd])->one();
     /*Noted check by status approval =1 header table | chek error record jika kosong*/
     $detdinas = $dinasHeader->detdinas;
     $employ = $dinasHeader->employe;
     $dept = $dinasHeader->dept;
     if ($v == 101) {
         $filterPdf = "KD_SA='" . $kd . "' AND (STATUS='101' OR STATUS='10')";
     } elseif ($v != 101) {
         $filterPdf = "KD_SA='" . $kd . "' AND STATUS<>'3'";
     }
     $Detaildinas = Sadetail::find()->where($filterPdf)->all();
     /* PR Filter Status Output to Grid print*/
     $dataProvider = new ArrayDataProvider(['key' => 'ID', 'allModels' => $Detaildinas, 'pagination' => ['pageSize' => 20]]);
     //PR
     //$dataProviderFilter = $dataProvider->getModels();
     /* $StatusFilter = ["101","10"];
             $test1 = ArrayHelper::where($dataProviderFilter, function($key, $StatusFilter) {
                  return is_string($value);
             });
     		print_r($test1); */
     $content = $this->renderPartial('pdfview', ['dinasHeader' => $dinasHeader, 'detdinas' => $detdinas, 'employ' => $employ, 'dept' => $dept, 'dataProvider' => $dataProvider]);
     $pdf = new Pdf(['mode' => Pdf::MODE_CORE, 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER, 'content' => $content, 'cssFile' => '@lukisongroup/web/widget/pdf-asset/kv-mpdf-bootstrap.min.css', 'cssInline' => '.kv-heading-1{font-size:12px}', 'options' => ['title' => 'Form Request Order', 'subject' => 'ro'], 'methods' => ['SetHeader' => ['Copyright@LukisonGroup ' . date("r")], 'SetFooter' => ['{PAGENO}']]]);
     return $pdf->render();
 }
开发者ID:adem-team,项目名称:advanced,代码行数:33,代码来源:PurchaseReportController_2.php


示例20: dirname

<?php

use kartik\mpdf\Pdf;
$params = array_merge(require __DIR__ . '/../../common/config/params.php', require __DIR__ . '/../../common/config/params-local.php', require __DIR__ . '/params.php', require __DIR__ . '/params-local.php');
return ['id' => 'app-backend', 'basePath' => dirname(__DIR__), 'controllerNamespace' => 'backend\\controllers', 'bootstrap' => ['log'], 'modules' => [], 'homeUrl' => '/admin', 'components' => ['request' => ['baseUrl' => '/admin'], 'urlManager' => ['enablePrettyUrl' => false, 'showScriptName' => true], 'pdf' => ['class' => Pdf::classname(), 'format' => Pdf::FORMAT_A4, 'orientation' => Pdf::ORIENT_PORTRAIT, 'destination' => Pdf::DEST_BROWSER], 'user' => ['identityClass' => 'common\\models\\User', 'enableAutoLogin' => true], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'errorHandler' => ['errorAction' => 'site/error']], 'params' => $params];
开发者ID:sowanderr,项目名称:mir,代码行数:5,代码来源:main.php



注:本文中的kartik\mpdf\Pdf类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP select2\Select2类代码示例发布时间:2022-05-23
下一篇:
PHP icons\Icon类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap