NXP-12634: better handle csv and pdf view mode