added parsing of url to make canonical path of pdf files