承接 dixonstarter/yii2-pdfprint 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dixonstarter/yii2-pdfprint

最新稳定版本:1.3

Composer 安装命令:

composer require dixonstarter/yii2-pdfprint

包简介

Load PDF into iframe and call print.

README 文档

README

Load PDF into iframe and call print.

Installation

The preferred way to install this extension is through composer.

ezgif.com-video-to-gif.gif

Either run

php composer.phar require --prefer-dist dixonstarter/yii2-pdfprint "*"

or add

"dixonstarter/yii2-pdfprint": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \dixonstarter\pdfprint\Pdfprint::widget([
  'elementClass' => '.btn-pdfprint'
]);?>
<a href="url/test.pdf" class="btn-pdfprint">open</a>

in GridView

<?= GridView::widget([
        'dataProvider' => $dataProvider,
        'filterModel' => $searchModel,
        'columns' => [
            [
              'class' => 'yii\grid\SerialColumn',
              'options'=>['style'=>'width:30px;'],
              'contentOptions'=>['class'=>'text-center']
            ],
            // use in column
            [
              'attribute'=>'value',
              'format'=>'html',
              'value'=>function($model){
                return Html::a('<i class="glyphicon glyphicon-print"></i>',['pdf/url'],['class'=>'btn-pdfprint btn btn-default','data-pjax'=>'0']);
              }
            ],
            // use in ActionColumn
            [
              'class' => 'yii\grid\ActionColumn',
              'header'=>'Actions',
              'options'=>['style'=>'width:150px;'],
              'buttonOptions'=>['class'=>'btn btn-default'],
              'template'=>'<div class="btn-group btn-group-sm text-center" role="group">{print} {view} {update} {delete} </div>',
              'buttons'=>[
                'print'=>function($url,$model){
                  return Html::a('<i class="glyphicon glyphicon-print"></i>',['pdf/url'],['class'=>'btn-pdfprint btn btn-default','data-pjax'=>'0']);
                }
              ]
            ],
        ],
    ]); ?>

统计信息

  • 总下载量: 11.4k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固