Skip to content

Instantly share code, notes, and snippets.

@Regulust
Last active December 11, 2021 15:28
Show Gist options
  • Select an option

  • Save Regulust/87c0a647527e486fcc5ca5958204085c to your computer and use it in GitHub Desktop.

Select an option

Save Regulust/87c0a647527e486fcc5ca5958204085c to your computer and use it in GitHub Desktop.
.eps转.pdf批处理脚本;transfer .eps to .pdf in batch mode (macOS/Linux here, Need TeXLive installed).
for f in ./*.eps; do epstopdf "$f"; done
# 批量eps转为pdf脚本; transfer .eps to .pdf in batch mode (macOS/Linux here).
# 保存为xxx.sh文件,置于eps所在文件夹,然后在该路径下执行 ./xxx.sh 即可(注意可能需要 chmod +x xxx.sh 给予可执行权限)。
# ref: https://m.weibo.cn/1578561911/4649788014857967 和 https://tex.stackexchange.com/questions/201175/how-to-use-epstopdf-in-batch-mode
@Regulust
Copy link
Author

Regulust commented Dec 11, 2021

Windows 下的批处理命令:可直接在目标路径使用cmd命令行执行,也可保存为.bat文件置于.eps文件所在文件夹执行

for %f in (*.eps) do epstopdf  "%f" "%~nf.pdf"
# Windows bat: eps2pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment