PHP and Adobe FDF/PDF

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Matthew Speed

    PHP and Adobe FDF/PDF

    I am trying to figure out how to do the following:

    1. Upload an Adobe FDF to my server
    2. read the field names out of the FDF into MySQL for future use
    3. Generate an interview form based upon the fields read
    4. write a permanent pdf to the server populating the fields

    I can do the upload, I can write to the database and I can generate a
    dynamic interview form based upon the fields read. The interaction
    with an FDF and PDF are beyond me. Can someone point me in the right
    direction to start this?

    TIA
  • nc@iname.com

    #2
    Re: PHP and Adobe FDF/PDF

    Matthew Speed wrote:[color=blue]
    >
    > I am trying to figure out how to do the following:[/color]

    I am assuming you have the FDF Toolkit installed on
    your server and configured properly...
    [color=blue]
    > 1. Upload an Adobe FDF to my server
    > 2. read the field names out of the FDF into MySQL for future use[/color]

    OK, let's pretend for simplicity that the FDF transmits
    only one field called 'info'. So here's what you do:

    $fdf = fdf_open_string ($HTTP_FDF_DATA );
    $info = mysql_escape_st ring(fdf_get_va lue($fdf, 'info'));
    fdf_close($fdf) ;
    mysql_query("IN SERT INTO sometable SET info='$info'");
    [color=blue]
    > 3. Generate an interview form based upon the fields read
    > 4. write a permanent pdf to the server populating the fields
    >
    > I can do the upload, I can write to the database and
    > I can generate a dynamic interview form based upon the
    > fields read. The interaction with an FDF and PDF are
    > beyond me.[/color]

    For a good reason, for there is none. With FDF, all you
    can do is manipulate pre-existing forms. You cannot make
    a permanent (i.e., formless) PDF, unless you generate the
    PDF from scratch using whatever PDF generation facility
    you have (PDFlib, ClibPDF, FPDF, whatever).

    Cheers,
    NC

    Comment

    Working...