开发者

Writing HTML Form values in pdf file using PHP

开发者 https://www.devze.com 2023-03-08 01:21 出处:网络
<form> Last Name <input name=\"lastname\" type=\"text\"/><br/> First Name <input name=\"firstname\" type=\"text\"/><br/>
<form>
Last Name
<input name="lastname" type="text"/><br/>
First Name
<input name="firstname" type="text"/><br/>
Middle Name
<input name="middlename" type="text"/><br/>
</form> 

How do I write all this html form values in following pdf file using php

I know there are so many php libraries for this but my pdf file so much complicated i.e for storing suppose first name of HTML form to pdf I have so many small small text boxes in pdf but In HTML form I have only one text box for first name. How should I开发者_高级运维 do that.

This is the sample pdf image

Writing HTML Form values in pdf file using PHP

http://img21.imageshack.us/img21/4793/testpdf.jpg


You'll need to use one of the PHP PDF libraries. FPDF (http://www.fpdf.org/) will probably do everything you need and it has the benefit of not being a compiled extension.

Whichever library you use, it is likely to have its own documentation and reference resources.


As the other answers mention you need to use a PDF library.

I personally prefer http://framework.zend.com/manual/en/zend.pdf.html


Use one of several existing PDF libraries or one of several existing webservices


There are a number of solutions for writing PDF files from PHP. The one that I know best is called TCPDF.

The reasons I recommend it are:

  • It's open source

  • It's in active development and gets regular updates

  • It's very feature-rich

But as I say, there are other options, several of which have been suggested by others here. You'll need to investigate them all and find out which best suits your needs.


I have found the solution I have used createFDF library from following site, http://koivi.com/fill-pdf-form-fields/

0

精彩评论

暂无评论...
验证码 换一张
取 消