DRY pdf model and controller. Try to reduce complexity.