Adjusts fileroot for document paths at the moment that the document is to be displayed.