2019-01-23 07:33
浏览 104

如何使用php和fpdf创建发票pdf? [关闭]

Here user can order their items and after confirmation of order they can download invoice file. After a quick Google I know about fpdf .but my question is how to create unique users invoice pdf through fpdf and php?
This is my cart page. When user click confirm oder they redirect into success page where they can download their invoice
cart page

[It is success page][2]error in generate unique user pdf code Part -1code part 2code part 3

图片转代码服务由CSDN问答提供 功能建议

此处用户可以订购他们的物品,在确认订单后,他们可以下载发票文件。 快速谷歌后我知道fpdf。但我的问题是如何通过fpdf和php创建独特的用户发票pdf?
这是我的购物车页面。 当用户点击确认或他们重定向到成功页面,他们可以下载他们的发票
< / p>

[这是成功页面] [2] 生成唯一用户pdf时出错 代码第-1部分 代码第2部分 代码第3部分 \ n

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douxing8855 2019-01-23 08:03

    Firstly I would suggest to use TCPDF

    You can do following steps to generate pdf:

    1. Gather all the data in session.

    2. After confirming order get all the data from the session and use that data in generating pdf file

    3. Use following link to get the example how to generate pdf. TCPDF Examples It will help you to code for generating pdf.

    4. For unique user pdf generation you can rename the file name with user_id + timestamp

    打赏 评论

相关推荐 更多相似问题