Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7404121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:12:35+00:00 2026-05-29T05:12:35+00:00

I have many PDF forms, I would need to fill them each in php

  • 0

I have many PDF forms, I would need to fill them each in php with the data I already have.

Here is just a sample PDF form , I want to fill this form using php. The data I already have in DB. I just want to fill this form and save it.

I am working in PHP Zend Framework.

All I want is when I would download those forms from my site, it would pre-fill all the fields in the pdf form with the information I already have.

Please help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T05:12:36+00:00Added an answer on May 29, 2026 at 5:12 am

    Calling pdftk is a nice way to accomplish this. I’ll assume that you know how to execute an external program and leave that out.

    First, create an FDF file from your PDF.

    pdftk form.pdf generate_fdf output data.fdf
    

    You can now use that as template. The sample that you provided looks like this:

    %FDF-1.2
    %<E2><E3><CF><D3>
    1 0 obj 
    <<
    /FDF 
    <<
    /Fields [
    <<
    /V ()
    /T (Date)
    >> 
    <<
    /V /
    /T (CheckBox2)
    >> 
    <<
    /V /
    /T (CheckBox3)
    >> 
    <<
    /V /
    /T (CheckBox4)
    >> 
    <<
    /V /
    /T (CheckBox5)
    >> 
    <<
    /V ()
    /T (Your_Last_Name)
    >> 
    <<
    /V ()
    /T (Your_First_Name)
    >> 
    <<
    /V /
    /T (CheckBox1)
    >>]
    >>
    >>
    endobj 
    trailer
    
    <<
    /Root 1 0 R
    >>
    %%EOF
    

    The fields are lines that start with /V (). Enter your desired values into those fields. For example:

    %FDF-1.2
    %<E2><E3><CF><D3>
    1 0 obj 
    <<
    /FDF 
    <<
    /Fields [
    <<
    /V (February 4, 2012)
    /T (Date)
    ...
    

    Finally, merge the FDF with the PDF. Execute the command:

    pdftk form.pdf fill_form data.fdf output form_with_data.pdf
    

    If you don’t need to keep the FDF and generated PDF files, you can simply pipe the data via stdin and stdout instead of using temp files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many pdf files in my project so I need it available to
i have a codeigniter website structured like so: website.org/files/stuff/1/example.pdf website.org/www/index.php So all files (many
I have many items inside a list control. I want each item to have
I have a windows .NET application that manages many PDF Files. Some of the
I have an application that sends out many PDF's to a printer. Has anyone
I have created new PDFs many times using Zend and PHP. But Now I
There are many documentaion on internet or user guides which have no pdf. They
I have many file types: pdf, tiff, jpeg, bmp. etc. My question is how
I have a directory that contains many sensitive pdf documents. If someone knew the
I have an application that has many cases. Each case has many multipage tif

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.