ECMS-5655: Fix some problems relate to PDF JS