Best practices for working with PDF libraries