Fix Empty PDF file after cache purge