Advanced pdf generating application_controller