我正在使用https://github.com/kartik-v/yii2-mpdf在Yii2中创建PDF.我有我的第一页,但我需要添加一个分页符,并确保我在新页面上启动第二条信息.我不确定该怎么做.我试过了:
public function actionReports() { $data = date('d F Y',time()); $content = $this->renderPartial('_billing', [ 'model' => $data, ]); $doc = new Pdf([ // set to use core fonts only 'mode' => Pdf::MODE_UTF8, // A4 paper format 'format' => Pdf::FORMAT_A4, // portrait orientation 'orientation' => Pdf::ORIENT_PORTRAIT, // stream to browser inline 'destination' => Pdf::DEST_BROWSER, // your html content input 'content' => $content, ]); return $doc->render(); }
视图
use yii\helpers\Html; ?>= Html::img(\Yii::getAlias('@web') . '/images/c.png'); ?> = Html::img(\Yii::getAlias('@web') . '/images/s.png', ['width' => 150, 'height' => 55]); ?>Quarterly Billing Summary
= $model; ?>
.... rest of text ....... Tabulated report of billing ... 本
似乎并没有呈现第二页?
1> scaisEdge..:尝试简单地创建包含页面和添加的视图
"" in view where you need this will create page break 更简单的方面是管理两个页面..
这是来自http://mpdf1.com/manual/index.php?tid=108
您可以使用HTML代码或PHP强制在文档中的任何位置分页:
$mpdf->AddPage(); 推荐阅读
如何解决《如何使用sparksc.textFile获取文件名?》经验,为你挑选了1个好方法。 ... [详细] 如何解决《CNAME到s3斗亚马逊》经验,为你挑选了1个好方法。 ... [详细] 如何解决《OpenCV鱼眼校准会削减过多的图像》经验,为你挑选了0个好方法。 ... [详细] 如何解决《Polymer1.2FIREBASEWARNING:用户回调抛出了异常》经验,为你挑选了1个好方法。 ... [详细] 如何解决《SQLServer备份文件过度增长》经验,为你挑选了1个好方法。 ... [详细] 如何解决《Python:itertools.product()的更快替代方案?》经验,为你挑选了1个好方法。 ... [详细] 如何解决《从调用方法并行执行方法》经验,为你挑选了0个好方法。 ... [详细] 如何解决《IndexError:索引10000超出了轴0的大小为10000的范围》经验,为你挑选了1个好方法。 ... [详细] 如何解决《Java8函数<String,Void>vsConsumer<String>》经验,为你挑选了1个好方法。 ... [详细] 如何解决《Swift_TransportException·无法与主机smtp.sendgrid.net建立连接[连接超时#110]》经验,为你挑选了1个好方法。 ... [详细] 如何解决《GIT分支机构如何运作?》经验,为你挑选了1个好方法。 ... [详细] 如何解决《如何使用JavaScript操作HTML元素》经验,为你挑选了1个好方法。 ... [详细] 如何解决《如何在生产中运行railsconsole而不执行弹簧?》经验,为你挑选了1个好方法。 ... [详细] 如何解决《使用Nightwatch访问iFrame元素》经验,为你挑选了2个好方法。 ... [详细] 如何解决《Swing图形不会显示-Java》经验,为你挑选了1个好方法。 ... [详细] 如何解决《与"流媒体"实施相反》经验,为你挑选了0个好方法。 ... [详细] 如何解决《在Akka消息中发送期货好吗?》经验,为你挑选了1个好方法。 ... [详细] 如何解决《检查列表Python中的特定数字》经验,为你挑选了1个好方法。 ... [详细] 如何解决《IIS8中的Websockets反向代理》经验,为你挑选了2个好方法。 ... [详细] 如何解决《Bootstrap导航不会在仿真/真实设备上折叠》经验,为你挑选了1个好方法。 ... [详细]吐了个 "CAO" !Tags | 热门标签RankList | 热门文章
- 1为什么animateLayoutChanges会在动画结束前移动兄弟视图的位置?
- 2如何缓存函数布尔结果
- 3如何使用ZonedDateTime或Java 8将任何日期时间转换为UTC
- 4我何时以及如何使用selenium webdriver按标记名定位元素?请举例说明
- 5使用Beautiful Soup时,无需任何猜测即可正确检测编码
- 6简单的html dom解析器返回错误500
- 7删除所有空格除了捕获组中包含的内容
- 8为什么这不会在内联中工作?
- 9使用Swift Package Manager时,如何生成用于开发的Xcode项目文件
- 10如何按字母顺序对字符串的ArrayList进行排序?
- 11如何对键进行排序:按列表中的值列出字典?
- 12为什么有些字符不能在Python的IDLE中输入?
- 13计算长数中的Set位数
- 14Laravel说Auth guard []没有定义
- 15如何在Swift for Linux中读取用户输入或stdin?
- 16在工具栏下设置导航抽屉
- 17UICollectionView每行显示3个项目
- 18groovy if语句与变量中的正则表达式
- 19使用fetch时拒绝承诺
- 20在Sails.js中使用客户端模板
DevBox开发工具箱 | 专业的在线开发工具网站 京公网安备 11010802040832号 | 京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有