pdf2eps implement
作者:互联网
Well, I used the command pdftops
in the LaTeX distribution such as MiKTeX/TeXLive/CTex to implement one pdf2eps
command, as follows
@echo off
rem pdf2eps <pdf file without ext>
set filename=%~dpn1
pdfcrop "%filename%.pdf" "%filename%-cropped.pdf"
pdfseparate "%filename%-cropped.pdf" "%filename%-cropped-%%d.pdf"
for /f %%f in ('dir /b %filename%-cropped-*.pdf') do (
pdftops -f 1 -l 1 -eps "%%~dpnf.pdf" "%%~dpnf.eps"
del "%%~dpnf.pdf">nul
)
del "%filename%-cropped.pdf">nul
Save it as pdf2eps.bat
, and copy it to where pdftops
is, and make it available by command prompt, e.g. add corresponding path to environment.
The usage is
pdf2eps "the name of pdf withou extension"
Ok, all done!
标签:%%,dpnf,cropped,filename%,pdf,implement,pdf2eps 来源: https://www.cnblogs.com/troy-daniel/p/pdf2eps.html