@echo off if "%1"=="" goto usage if not exist %1 goto usage for %%X in (%1 %2 %3 %4 %5 %6 %7 %8 %9) do echo. & echo Processing %%X: & epstool -b -c -ggs.exe -o$tmp$.eps %%X & del %%X & ren $tmp$.eps %%X goto exit :usage echo. echo This script calculates bounding box of the given file(s), and then replaces echo its/their %%BoundingBox: by the calculated value. echo. echo Usage: CalcPSBB _(encapsulated)_postscript_file(s)_ echo. echo Requirements: - Ghostscript is called gs.exe echo - epstool.exe and gs.exe are on PATH :exit