How to prompt user to download a file? How to prompt user to download a file in browser from custom module php code?

I tried first the php way

&lt;?php
header('Content-type: application/pdf');
header('Content-Disposition: attachment; filename="downloaded.pdf"');
readfile('original.pdf');
?&gt;


It silently fails. Then I realized there is a "drupal way" to do it.
So I tried 

drupal_add_http_header('Content-Type', 'application/octet-stream');
drupal_add_http_header('Content-disposition', 'attachment; filename='.$fname);
drupal_add_http_header('Content-Length', filesize($fpath));


but still not working.
I think one possible reason for failure is that I am not sure at each step which is the correct path I should use.

Should it be 
'/home/mysite/public_html/sites/default/files/pdfs/'.$filename.'.pdf'

or just the part that starts in the drupal root 
'/sites/default/files/pdfs/'.$filename.'.pdf'

or even just 
'public://pdfs/'.$filename.'.pdf' 

as I see it in some other threads. I wonder why it has to be so complicated.
Have you tried the http://drupal.org/project/file_force Module ?
Some details from the module's project page:

File Force Download can be used to force the user's web browser to download the file to disk instead of displaying it in the browser window.
Web browsers today are pre-configured to render various types of media directly, such as text files, various image, video and audio formats, PDF documents, and Flash movies. While it is still possible to save such files afterwards by right-clicking on them and selecting &quot;Save As..&quot;, it is sometimes desirable to just offer the file for download in the first place. File Force Download solves this issue by supplying a file with certain HTTP headers which instruct the web browser to download the file to the user's disk instead of displaying it in a browser window.

It should be a good starting point for inspiration for your own module.