trying to fix pdf generation, attempt 4