【问题标题】:DOMPDF <div> tag as header and footerDOMPDF <div> 标签作为页眉和页脚
【发布时间】:2012-02-26 03:43:51
【问题描述】:

我需要使用 DOMPDF 在标签上创建页眉和页脚。我怎样才能做到这一点?

假设我有一个像这样的头类:

<div class='header'>
    <div>
        <img scr='image1.png' style="width:100px; height:150px" />
        <h1>This is header</h1>
    </div>
</div>

还有一个像这样的页脚

<div class='footer'>
    <div>
        <img scr='image1.png' style="width:100px; height:150px" />
        <h1>This is a footer. All rights reserved.</h1>
        <img src = image2.png style="width:100px; height:150px;">
    </div>
</div>

我想创建那些 &lt;div&gt; 标记(类页脚和类页眉)来创建 DOMPDF 页眉和页脚。
任何建议都非常感谢!干杯!

【问题讨论】:

  • 什么?请详细说明您的答案^^

标签: php cakephp pdf-generation dompdf


【解决方案1】:

CSS:

position:fixed; 
top: 0; or bottom: 0;

【讨论】:

    猜你喜欢
    • 2012-03-07
    • 1970-01-01
    • 2011-06-19
    • 2013-09-05
    • 2012-10-29
    • 2019-10-04
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多