In a windows environment, I use command line with psql to run a query. would like to create a report with the output data from this query.

So far I was able to export the data in html using the "-H" option in psql. I then append this info to another html page which contains a small picture and some text.

I actually need the results in pdf. Do you know any way to run a query in command line/psql and get the results in pdf or export the data in html and convert it to pdf via command line?

( saw several options but I didn't want to buy software...Openoffice has some features but not there yet. )