how to fill up a form in an pdf existing file using php

Discussion in 'PHP' started by zeenatnaheed, Sep 15, 2009.

  1. #1
    I have a pre-designed form stored as a .pdf
    I need to fill up the form in the file with data from Mysql.

    Can any one help me with the php codes to solve my problem?
     
    zeenatnaheed, Sep 15, 2009 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    PDF is a PHP class which allows to generate PDF files with pure PHP
    You can find it @ http://www.fpdf.org/
     
    crivion, Sep 15, 2009 IP
  3. zeenatnaheed

    zeenatnaheed Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I had visited the site earlier, it helps generate pdf files using pure php.
    But I already have a PDF file that contains a form and I need to fill up the form using data retrieved from a MySql Database table using php.
     
    zeenatnaheed, Sep 15, 2009 IP
  4. plog

    plog Peon

    Messages:
    298
    Likes Received:
    11
    Best Answers:
    1
    Trophy Points:
    0
    #4
    I don't think fpdf can open existing .pdf files. What I normally do is save the .pdf as a .png which fpdf can open, create a new .pdf using the .png as the background and then map out where all the data from the database needs to go.

    I have never used this, but I found FPDI which claims to be able to open existing .pdf files

    http://www.setasign.de/products/pdf-php-solutions/fpdi/
     
    plog, Sep 15, 2009 IP