reformat
using % operator for templating is not save here
i.e. if %20 is use in a link of the page
add setting for allowing pdf generation globally
resolvuid isn't always at the end or the beginning of the url
fix for when no element of the tree is selected
fix for resolving relative urls and catching exceptions