PDF refactoring