Forum OpenACS Q&A: Response to Help for using HTMLDOC to output pdf file/download pdf file

Are you using exactly the same procedure as in the original question? Then the problem might be with using set_the_usual_form_variables - I am not sure if that still works as expected under OpenACS 4.x. Try to pass the file_name directly to the proc instead, something like:

ad_proc pdf_downloader { file_name } { } {

if { [empty_string_p $file_name] } ... and so on