It is not possible to place the javascript into .pdf files.
One workaround to tracking download files is to put your downloads on a separate domain.
For example, we would like to track:
http://www.opentracker.net
if I keep all my pdf/ images/ word docs at:
downloads.opentracker.net
This will make it easy to see when your visitors click on your .pdfs and downloads. Visitor clicks will register as an exit links?. The download stats will be registered in the "top exits" report.
An additional alternative is an html "thank you for downloading" page.