Lighten https://mimetype.io/all-types use this to determine file type https://headlessui.com/react/transition (for UI) gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -sOutputFile=dictionary-opt.pdf dictionary.pdf