<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

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.