|
|
发表于 2023-10-20 10:02:55
|
显示全部楼层
回复 1# tttoi2000
请参考Q-04把test.bat文件保存为ANSI编码:
https://mp.weixin.qq.com/s/Koje4FufWxWBs7ioDy_LJA- @echo off
- REM 1、下载并安装 Ghostscript 这个命令行工具
- REM https://www.ghostscript.com/releases/gsdnld.html
- REM 2、根据自己电脑实际安装路径设置以下临时环境变量
- set "path=C:\Program Files\Ghostscript\gs10.00.0\bin;%path%"
- cd /d "%~dp0"
- for /f "delims=" %%i in ('dir /b /s /a-d *.pdf') do (
- pushd "%%~dpi"
- md "%%~ni"
- echo,%%i
- gswin64c.exe -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dGridFitTT=2 -dUseCropBox -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -r300 -sDEVICE=jpeg -dJPEGQ=100 -sOutputFile="%%~ni\%%~ni.%%03d.jpg" "%%i"
- popd
- )
复制代码 |
|