Fix coding syntax mistakes in PDF functions