ps2pdf
1.安装 ghostscript
macOS : os.system(‘ps2pdf .ps .pdf’)
win:
gswin64c ^
-sDEVICE=pdfwrite ^
-o .pdf ^
.ps
2.还可以用ImageMacgick
convert 命令,但是复杂一点
pdf 剪裁
依然用ghostscript
macOS:
gs
-o cropped.pdf
-sDEVICE=pdfwrite
-c “[/CropBox [24 72 559 794]”
-c " /PAGES pdfmark"
-f qq.pdf
win:
gswin64c.exe ^
-o .pdf ^
-sDEVICE=pdfwrite ^
-c “[/CropBox [100 100 300 300]” ^
-c " /PAGES pdfmark" ^
-f .pdf
旋转pdf
macOS:
pdftk input.pdf cat 1right output output.pdf
win:
pdftk input.pdf cat 1right output output.pdf