dty5753 2011-01-03 17:08
浏览 100

PHP:生成PDF文档。 如何创建模板?

i have found this tutorial to generate a pdf.

In that tutorial there is this kind of code:

// list headers
$pdf->CreateTextBox('Quantity', 0, 120, 20, 10, 10, 'B', 'C');
$pdf->CreateTextBox('Product or service', 20, 120, 90, 10, 10, 'B');
$pdf->CreateTextBox('Price', 110, 120, 30, 10, 10, 'B', 'R');
$pdf->CreateTextBox('Amount', 140, 120, 30, 10, 10, 'B', 'R');

Should i write this kind of code by hand or there is any app (word processor, vectorial graphics app, what ever) where I can draw the template (size of the cells, colors, etc) of the pdf document first?

I have already created the invoice for the web using HTML/CSS.

Is my first time generating PDF documents so any advise will be wellcome.

Regards

Javi

  • 写回答

2条回答 默认 最新

  • dosgy00204 2011-01-03 17:17
    关注

    There aren't any resources to create PDF templates for you - but you might want to look into wkhtmltopdf - which will let you convert your HTML invoices to PDFs (without needing to generate the PDF yourself).

    评论

报告相同问题?

悬赏问题

  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算
  • ¥15 java如何提取出pdf里的文字?