fix pdf writter