|
本帖最后由 slore 于 2024-5-26 12:11 编辑
使用方法: txt2ps.bat SSJ.txt
txt2ps.bat
- @echo off
- if "%~1"=="" goto :EOF
- md output 2>nul
- for /f "delims=" %%i in (%1) do call :OUTPUT %~n1 %%i
- goto :EOF
- :OUTPUT
- (
- echo %%!PS-Adobe-3.0
- echo %%%%Title: %1
- echo %%%%BoundingBox: 0 0 10 10
- echo %%%Pages: Atend
- echo %%%%EndComment
- echo %%%%Page: 1 1
- echo /S3J 10 selectfont
- echo 0 2.25 moveto
- echo ^<%2^>
- echo [10]
- echo xshow
- echo showpage
- echo %%%%PageTrailer
- echo %%Pages: 1
- echo %%%%Trailer
- echo %%%%EOF
- ) > output\%2-%1.ps
- goto :EOF
复制代码 |
|