Is there a way to record views to a pdf document


i have simple application.cfc file placed in folder pdf documents. need record useage these documents management. record views when user goes html page or cfm page not pdf. there way count these?

 

i'm including hit counter code application.cfc file although work web pages. 


<cffunction name="onrequeststart" returntype="boolean" output="true">

<cfquery name="addhit" datasource"#ds#">

     insert hits

(remote_address, page, date)

values

('#remote_addr#','#script_name#',''#today#')

</cfquery>

 

<cfreturn true>

</cffunction>

 

i've tried moving in folder above thinking may affect still same results - no counts pdf documents.  suggestions?

the pdf files not being recorded application.cfc because pdf files not handled coldfusion.  such not go through coldfusion request cycle (including application.cfc). 

 

i guess create coldfusion template serve pdf files.  request go through application.cfc.  not sure that's direction take report usage stats.  using web analytics tool site (webtrends, google, etc.)?  tools can report on file accesses.  or analyze web server's log files see how many times pdf files being downloaded.



More discussions in ColdFusion


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support