down2323 2013-01-21 20:10
浏览 35
已采纳

使用PHP创建PDF并插入数据

I realize similar questions have been asked here and other places but I am having trouble finding information relevant to what I am trying to do that was written within the last 5-10 years so any help is much appreciated.

What I would like to do it have an html form that when filled out and submitted generates a PDF which is 3.5" x 2" @ 300dpi with a 0.125" bleed on all sides. The form would be simple text entries: name, email, etc and it would place them onto this premade 3.5" x 2" PDF file (a template of sorts with a background image etc) and then save a new file with the text entries added. The PDF may also be emailed after creation.

What sort of library would be best to accomplish something like this in PHP 5.2? Would I need to first create an html/css layout of the document and then convert it to a PDF? I'm feeling a bit lost here.

  • 写回答

5条回答 默认 最新

  • dongteng2534 2013-01-21 20:20
    关注

    try fpdf (free pdf) http://www.fpdf.org/ You can insert content into the pdf using fpdf's methods and you can determine the size of the document and the borders (don't know if you can specify bleed specifically). I used it to produce property brochures and posters on a commercial property website and it works well.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?

悬赏问题

  • ¥15 运动想象脑电信号数据集.vhdr
  • ¥15 三因素重复测量数据R语句编写,不存在交互作用
  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目