Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    san marcos TX
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    xml -> html -> pdf

    Ok, I hope somebody can at least tell me where to get started on this project..

    I need to build a website that will be 10 - 15 static pages. One of the requirements is that all the pages will need to be presented in html as well as pdf, in a brochure like format for printing.

    I have been reading a little about customizing pdfs using the FDF format with PHP and I think something along this line is what I need.

    What I want to do is write the content into an xml file, that can then be translated into HTML or pdf dynamically. I am very new to xml and php, though i have a decent bit of experience with perl.

    So i have a few questions..

    Can this be done? I'm pretty sure it can, but I'd like a second opinion.

    Is it worth it to do it this way?

    Anybody already have a good resource that touches on this?

    Any other direction / info would be helpful.

    Thanks, Jesse

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Just have one XML file, and then an XSLT document to convert it to XHTML, and another to convert it to XSL-FO. XSL-FO can be converted into PDF with a free utility at apache.org I believe.

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    san marcos TX
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OK, some dumb questions if you don't mind.. one xml document for each page, or the whole site?

    So is XHTML just xml converted to html via xslt?

    And is what you are describing something that would happen dynamically whenever the page is loaded, or would the files be created and saved as static files?

    thanks!

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    I'd probably do an individual XML document for each page. It should just be information, and nothing but.

    As for dynamic transforms, or statically saved files, you could go either way, though it might be easier/quicker in the long run to have the server transform them once, and be done with it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •