Fix pdf save on windows