Question about CSS = xml
February 3, 2005 9:39 AM   Subscribe

i'd like to use css+xml to render pdf on a server for *free*... any help? [mi]

i've looked into yeslogic prince and it sounds like the bee's knees, but their commercial server license is $2000 (?!?). jumping into xsl-fo is a bit more than i want to bite off at the moment; css is not a prob. any help would be greatly appreciated.

an alternative might be to use css to mold printing from a html file, but i'd like to be able to offer pdf to clients so that i know it will print correctly (whereas highly styled html might get eaten by ie).
posted by mdpc98 to Computers & Internet (10 answers total)
Do you know PHP? You can use it to parse your XML data and convert the output to PDF. Not sure about the CSS styling, but I don't think it would pose a problem.
posted by annathea at 10:22 AM on February 3, 2005

Yeah, I was going to suggest writing a PHP script that would position items on each page. However, the main PHP libraries for doing it require licenses for commercial use ($450 or $1000). There's a list of free alternatives here.
posted by cillit bang at 10:41 AM on February 3, 2005

pdflib is a free, well supported way to make pdfs. It has both a free and non-free version. I have rarely found a use for the non-free portions, although we have it at work. You'll have to do quite a bit of work to get from XML to pdf, although that's what we do here at work. You'll have to write a bit of custom code. pdflib is very low level "Write this piece of text at 752, 112. Draw a line from 750, 100 to 1000, 100" and so forth. It has bindings for most major languages (via swish)
posted by RustyBrooks at 11:38 AM on February 3, 2005

I'm not sure exactly what you're tring to do, but iText is an opensource Java library I've used on the server to create PDF's and spit them out to a web browser.

If you post some more details on what you're doing, I may be able to give you a better suggestion.
posted by gus at 12:40 PM on February 3, 2005

Oh yeah, another idea- PDFCreator. This sets up as a printer on your system, so any program that can print can print to a PDF.
posted by gus at 12:42 PM on February 3, 2005

Why not just plug it into a web browser of your choice and have it print to PS? This can all be automated.
posted by fvw at 2:26 PM on February 3, 2005

thanks for the feedback. time to start digging...
posted by mdpc98 at 3:24 PM on February 3, 2005

Jump to xsl-fo, it's great.
posted by holloway at 4:52 PM on February 3, 2005

mdpc, i have a movable type template that works in PHP to turn any content in the system into a PDF. email me (email's in the profile) if you are still looking.
posted by anildash at 1:43 AM on February 4, 2005

holloway--do you recommend any resources that particularly helped you?
posted by mdpc98 at 8:06 AM on February 4, 2005

« Older Folk/Ousider art in France?   |   DIY Valentine's Day hints Newer »
This thread is closed to new comments.