updated lib for pdf encoding