PHP, XML and PDF

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

    #1

    PHP, XML and PDF

    Hi all,

    We are working on a project in our school in which we want to create pdf
    documents through a webbased application.
    The people who will work with this system can create their own documents by
    filling in a php-form with all kinds of subjects, click on the save button
    and than will be able to click to download the document as a pdf, completely
    styled with an xsl-file.
    This is what we have thought out to accomplish this goal:

    In a php-page people can fill in all kinds of textfields. When they hit the
    savebutton, all these fields are stored as plain tekst in the
    MySQL-database.
    When a user wants to download the document (as a pdf), he calls another
    php-file which does the following:
    - create an xml-file from the data out of the database with XML tree
    (http://pear.php.net )
    - create a FO-file with XALAN (xsl-sheet attached) (http://xml.apache.org)
    - create a PDF from the FO-file with FOP (http://xml.apache.org)

    Is this the correct way of working with this kind of system?

    We have chosen to store the fields as plain text in the database and not the
    whole document as an xml-file because of reusing some parts of the documents
    for other documents.
    This way it will be much more flexibel to re-use text and stuff.

    I would like to hear opinions on this specific set-up for xml.
    Thanks in advance,

    Emiel B.


  • John Root

    #2
    Re: PHP, XML and PDF

    On 12/8/03 10:59 AM, in article br2hlm$fof$1@ne ws.cistron.nl,
    "RoyalDutch man" <emielpbAPEPIEM EL@hotmail.com> wrote:
    [color=blue]
    > When a user wants to download the document (as a pdf), he calls another
    > php-file which does the following:[/color]
    [color=blue]
    > - create an xml-file from the data out of the database with XML tree
    > (http://pear.php.net )[/color]
    OK
    [color=blue]
    > - create a FO-file with XALAN (xsl-sheet attached) (http://xml.apache.org)[/color]
    This step is unnecessary
    [color=blue]
    > - create a PDF from the FO-file with FOP (http://xml.apache.org)[/color]
    since Fop accepts the xml source file along with an xsl:fo stylesheet.


    John

    Comment

    Working...