And if (more likely :- ) it is the contents of the file, rather than its path, which you want to print, then you need to convert from the URL representation (“file://” etc, as used by browsers) to the unix style file path representation which OS X functions expect.
"file://localhost/Users/robintrew/Desktop/Some%20file%20that%20we%20want%20to%20print.txt"
→
"/Users/robintrew/Desktop/Some file that we want to print.txt"