summaryrefslogtreecommitdiff
path: root/support/wmf2epsc/inksc_wmf2epsc.cmd
blob: b162e232f7cf5d722081ba66ca07162011b00db1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
:: INKSC_WMF2EPSC.CMD: Inkscape conversion WMF|EMF to EPS
:: (without WMF2EPS virtual printer installation):
:: https://wiki.inkscape.org/wiki/Using_the_Command_Line
:: https://inkscape.org/de/gallery/item/12515/view/
:: https://inkscape.org/de/doc/inkscape-man.html
:: This cmd script is free, without any warranty.
:: 2023 W. Schulter
:: ---------------------------------------------------------------------------
:: Usage:
:: > inksc_wmf2epsc.cmd <wmf|emf-filespec> [dir-spec]
::   produces [dir-spec]\<wmf|emf-filespec>.eps files
:: Example: inksc_wmf2epsc.cmd fant.wmf --> .\fant.wmf.eps
:: ---------------------------------------------------------------------------
@echo off

:: 64 bit version of Inkscape
set INKSC="%ProgramFiles%\Inkscape\inkscape.exe"

:: output dir, . is default
set OUT=.
if [%2] NEQ [] (
  set OUT=%2
  mkdir %2
)

:: output resolution
set DPI=600

:: for loop, if argument %1 contains wildcard chars (* or ?)
for %%f in (%1) do (
  echo %%f
  %INKSC% --without-gui --file=%%f --export-eps=%OUT%\%%f.eps --export-dpi=%DPI%
)