clean ajax pdf generation