PDF controller refactoring