Fixed replace_pdf