Here is a simple illustration with the extension hard-coded.
<cfquery name="getEmps" datasource="cfdocexamples">
SELECT firstname FROM EMPLOYEE
</cfquery>
<cfoutput query="getEmps">
<a
href="#trim(firstname)#.pdf">#Firstname#</a><br>
</cfoutput>
You say "
Most of these are pdf."
You will need to leverage ColdFusion's file and string
manipulation functions to identify the document extenstion and pass
them to the url accordingly
See
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000353.htm
for help with ColdFusion functions