HTMLDOC PDF Generation

Okay. I've tried it all, or so it seems. The code:

generator = IO.popen("htmldoc-no-compression -t
pdf14-quiet-jpeg-path \".;http://#{request.env["HTTP_HOST"]
+ request.env["REQUEST_URI"]}\"-webpage -", "w+")
generator.close_write
send_data(generator.read, :filename => filename, :type =>
"application/pdf")

I basically just want to generate a pdf from a local url, like:

http://localhost:3000/projects/3/sprints

but, no dice. I can generate a pdf from an external URL. I can generate
a pdf by stuffing plain text in the 'generator' variable.

what gives? help!