Switching doc for pdf