PDF Utilities

upgrade template code