Forum OpenACS Q&A: HTMLDOC

Collapse
Posted by Allan Regenbaum on
Has anyone been able to use HTMLDOC to output directly to acrobat
rather than to file...

I have tried prepending

ns_write "output-type : application/pdf
" followed by

exec $htmldoc -t pdf --quiet --webpage $filename

and I have tried writing

doc_return  200 application/pdf "[exec $htmldoc -t pdf --quiet --
webpage $filename]"

both of these throw an error which includes the pdf content as
output..

feedback is appreciated

Collapse
2: Response to HTMLDOC (response to 1)
Posted by Patrick Giagnocavo on
try using

Content-Type: application/pdf

and include TWO
's.

Also, you might want to try generating the file first, THEN in a
separate step, returning the filename to the web browser.  I am
not familiar enough with htmldoc but I am wary of the way you are
specifying the file name.  Maybe more items are showing up in
the text returned to the client than the $filename?