PHP, XML and PDF

R

RoyalDutchman

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.
 
J

John Root

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 ) OK

- create a FO-file with XALAN (xsl-sheet attached) (http://xml.apache.org)
This step is unnecessary
- create a PDF from the FO-file with FOP (http://xml.apache.org)
since Fop accepts the xml source file along with an xsl:fo stylesheet.


John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top