2022年6月24日 星期五

PDF compress in Linux with gs

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output-ebook.pdf input.pdf
基本上這樣就可以把 PDF 檔壓到很小

-dPDFSETTINGS=/screen 可以壓到最小,但解析度很差

需要 ghostscript 套件

ref. PDF compress in Linux with command line utilities

RHEL 9 install xrdp

xrdp 是 Linux 版的 RDP server (遠端桌面) 它運作時需要 Xvnc 的 libvnc.so, 所以安裝時需要連同 VNC 一起安裝(只需 minimal) dnf -y install xrdp tigervnc-server-minimal system...