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 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)