dongqun9403 2014-05-17 12:05
浏览 124

具有绝对定位的HTML到PDF

I need to generate a PDF, which the user will print on a Specific form, so I have positioned the data in a way that the form will be filled in a proper way after printing.

As of now I have used absolute positioning like

<div class="page_container">
    <div class="first_name">
       John Smith
    </div>
</div>

The style is

.page_container {
    position:relative;
}

.page_container .first_name {
    position:absolute;
    left:50px;
    top:110px;
}

But I could not achieve the positioning in the generated PDF. I have tried with TCPDF and mPDF so far.

My question would be, is there any html to pdf library available to support the above code, else what could be the best alternative to achieve my requirement.

Additional Info: I develop this on Symfony2, I am also ready to use a core php library.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 制裁名单20240508芯片厂商
    • ¥20 易康econgnition精度验证
    • ¥15 线程问题判断多次进入
    • ¥15 msix packaging tool打包问题
    • ¥28 微信小程序开发页面布局没问题,真机调试的时候页面布局就乱了
    • ¥15 python的qt5界面
    • ¥15 无线电能传输系统MATLAB仿真问题
    • ¥50 如何用脚本实现输入法的热键设置
    • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
    • ¥30 深度学习,前后端连接