Converter

List of open source command line (batch oriented) file converter. It inspired by online-convert.com which this page try to provide the offline solution instead.

Notes (READ THIS FIRST):
- All apps below that marked with *(fc) may additionally (require fontconfig downloads as follow
fc-cache.exe 0.4 MB (not strictly needed but more convenient as one-time initializer)
fc-cache.7z 9 KB (Config files, some apps may already have it, some may not. just extract to the same place of executable)
- You can portably install missing/custom fonts in various format supported by Freetype into "fonts" subdirectory.


Vec2Web
Part of QCAD 2.x, is a GPL licensed app that render DXF (de facto CAD interchange format) into raster file (PNG) or vector file (EPS/Postscript) or SWF using QCAD as backend.

DXF to PS/EPS
vec2web file.dwg file.eps

DXF to PNG
vec2web file.dwg file.png

DXF to SWF
vec2web file.dwg file.swf

See Ghostscript for post-conversion

See DWG2DXF for pre-conversion

Download
vec2web.exe 1.5 MB
vec2web.7z (Hatches pattern and fonts needed for dimension/attribute rendering)

Sources
github.com/Seablade/vec2web
sourceforge.net/projects/qtwin/files


DWG2DXF
Part of libdxfrw which is part of LibreCAD project (a QCAD fork from which DWG feature only available commercially). It will read DWG files and able to convert to DXF, it's probably the only open source DWG reader that actually works (already better than libdwg). DWG2DXF also works very well with Vec2Web as long as you choose lower version DXF as output.

DWG TO DXF
dwg2dxf file.dwg -v2000 file.dxf

See Vec2Web for post-conversion
 
Download
dwg2dxf.exe 0.5 MB

Sources
sourceforge.net/projects/libdxfrw


Ghostscript (fc)
A well known professional grade Postscript interpreter and PDF writer. It also read PDF but poppler (xpdf) may be more appropriate in some cases. It support lots of output format with excellent printout quality and able to redirect to Windows printer spooler. This build here is compiled with MinGW but has more features than the official, such SVG output support (via cairo) and DJVU distiller. However since this is file conversion oriented, most of specific printer devices were omitted. This build also support fontconfig similar to Miktex's Ghostscript, just store your custom fonts in subdirectory "fonts" and you're ready to go. FYI since Adobe Illustrator (*.ai) basically either based on Postscript or PDF, Ghostscript thus can convert them, e.g into SVG.

Supported devices :
bbox bit bitcmyk bitrgb bitrgbtags bmp16 bmp16m bmp256 bmp32b bmpgray bmpmono bmpsep1 bmpsep8 cairo ccr cfax cif cups devicen dfaxhigh dfaxlow display djvumask djvusep eps2write faxg3 faxg32d faxg4 fpng ijs inferno ink_cov inkcov jpeg jpegcmyk jpeggray mgr4 mgr8 mgrgray2 mgrgray4 mgrgray8 mgrmono miff24 mswindll mswinpr2 nullpage pam pamcmyk32 pamcmyk4 pbm pbmraw pcx16 pcx24b pcx256 pcx256 pcx2up pcxcmyk pcxgray pcxmono pdfwrite pgm pgmraw pgnm pgnmraw pkm pkmraw pksm pksmraw plan plan9bm planc plang plank planm plib plibc plibg plibk plibm png16 png16m png256 png48 pngalpha pnggray pngmono pnm ppm ppmraw ps2write psdcmyk psdcmykog psdrgb pwgraster pxlcolor pxlmono rinkj sgirgb spotcmyk sunhmono svg tiff12nc tiff24nc tiff32nc tiff48nc tiff64nc tiffcrle tiffg3 tiffg32d tiffg4 tiffgray tifflzw tiffpack tiffscaled tiffsep tiffsep1 txtwrite xcf xpswrite
PS/PDF TO SVG
gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=cairo -sOutputFile=file.svg file.ps

AI TO SVG
gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=cairo -sOutputFile=file.svg file.ai
Note: you may also use -sDEVICE=svg but it may only works on simple ps/pdf input

PS/PDF TO DJVU
See DJVulibre section

PS/PDF TO XPS
gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=xpswrite -sOutputFile=file.xps file.ps

PS/PDF TO JPG/TIFF/PNG
gswin32c -q -dBATCH -dNOPAUSE -sDEVICE=jpegcmyk -sOutputFile=file.xps file.jpg

Download
gswin32c.exe 9.6 MB (version 9.16)
gswin32c.7z 13 KB (fontconfig configuration and optional ghostscript files)
initfcgs.exe 80 KB (fontconfig and ghostscript font cache/map initializer, only for first time use)

Sources
downloads.ghostscript.com/public


FFMPEG (fc)
Despite might be unpopular among end users, FFMPEG is the most commonly used backend for video/audio transcoding because most popular apps requiring video capability use it!  (VLC, Blender, Mplayer/Mencoder and many more). While there are many available builds out there, this build here is probably the only feature complete build for windows. This one also include hundreds third-party A/V FX libraries (frei0r and ladspa). In nutshell FFMPEG convert from every A/V format to every A/V format that users ever imagined be it lossy, lossless, industry-standard even legacy and obscure ones are supported.

Download
ffmpeg.exe 22.6 MB (version 2.7.2)
ffmpeg.7z  9.5 MB  (Frei0r/LADSPA FX libraries, Quvi scripts, Presets etc)
ffplay.exe 5.5 MB (video, audio and, image viewer)

Sources
ffmpeg.org/releases


ImageMagick (fc)
Widely popular in linux and quite commonly used as image editing backend by webservers, ImageMagick is mature image converter and editor. While many newer and leaner alternative/fork exists (e.g. OIIO, GraphicsMagick), none beat the completeness and its robust documentation. In Windows world XnView/ACDSee maybe more popular GUI-based converter however you can bet in term of features they are lacking. The build offered here is more feature complete and faster than the official (yes, it is!). There are separate 32bit and 64bit binaries available due to memory usage issue. IM support pretty much all kind of raster format you've ever heard plus few vector format as input. This build is AIO executable (patched to behave like GraphicsMagick) and build with the efficient MozJPEG.
64bit Q16:
Features: DPC HDRI OpenMP
Delegates (built-in): autotrace bzlib cairo djvu fftw fontconfig freetype fpx gvc jbig jng jp2 jpeg lcms lqr lzma openexr pangocairo png ps rsvg tiff webp xml zlib
32bit Q8:
Features: DPC OpenMP
Delegates (built-in): autotrace bzlib cairo djvu fontconfig freetype fpx gvc jbig jng jp2 jpeg lcms lqr lzma pangocairo png ps rsvg tiff webp xml zlib

EXR TO PNG
magick64 convert file.exr file.png

JPG TO FPX
magick convert file.jpg file.fpx

SVG TO WebP
magick convert -quality 50 file.svg file.webp
Note: if you ever need to resize the dimension, you should use rsvg-convert instead because IM's resizing is done in destructive raster mode.

GV TO WebP
magick convert file.gv file.png
Note: if you ever need to use other graphviz render method, you'll need dot to do that.

Download
magick.exe 4.3 MB (version 6.9.1)
magick64.exe 7.1 MB (version 6.9.1, 64bit)
dcraw.exe 400 KB (delegate for RAW image reader)
pngquant.exe 210 KB (lossy PNG encoder if Imagemagick quantizer don't satisfy you)
magick.7z 33 KB (configuration files, also needed for text processing and custom delegates)

Sources
imagemagick.org/download


RSVG-Convert (fc)
This is a companion tool for imagemagick since it offer non-destructive resizing and will rasterize svg twice faster than ImageMagick. It also natively convert Scalable Vector Graphics to Postscript/PDF format.

SVG TO WebP (with resizing)
rsvg-convert -w 4000 -h 2000  file.svg | magick convert -quality 50 - file.webp

SVG TO PS/PDF
rsvg-convert -f pdf -o file.pdf file.svg

See Imagemagick for post-conversion
See Ghostscript for post-conversion

Download
rsvg-convert.exe 1.9 MB (version 2.40.10)

Sources
ftp.gnome.org/pub/GNOME/sources/librsvg


DJVUlibre
This is a companion tools for Ghostscript to provide DJVU distilling support (gsdjvu).

PS/PDF TO DJVU
djvudigital --words file.pdf file.djvu

DJVU TO PS
djvups file.djvu > file.ps

See Ghostscript for post-conversion

Download
djvudigital.exe 85 KB (version 3.5.27 require Ghostscript)
csepdjvu.exe 333 KB (version 3.5.27 required by djvudigital)
djvups.exe 438 KB (version 3.5.27)

Sources
sourceforge.net/projects/djvu/files


GDAL
Fundamental backend for Open Source GIS apps. Provided here as an AIO executable, it support conversion of many raster/vector format with many editing capability too. Personally using it when I works with ASTER GDEM dataset. This GDAL version built with most of "free" features including GeoTIFF with LZMA.

SHP TO PDF

Download
gdal.exe 9 MB (version 1.11.2)

Sources
download.osgeo.org/gdal


Poppler (fc)
Cross platform PDF renderer fork of UNIX-only x-pdf. Poppler interpret better than Ghostscript in some cases especially newer PDF version. It could become SVG-PDF round-trip for RSVG as it also use Cairo (pdftocairo), also round-trip for HTMLDoc (pdftohtml). This version is built with experimental CMYK enabled and in AIO executable mode.

PDF TO HTML
poppler pdftohtml file.pdf file.html

PDF TO SVG
poppler pdftocairo  file.pdf file.svg

See HTMLDoc for inverse conversion

Download
poppler.exe 1.6 MB (version 0.34)
poppler.7z 1.5 MB (Unicode data, configuration files)

Sources
poppler.freedesktop.org


Librevenge
It is another SVG writer backend for various vector/composite converter of  legacy commercial formats such as WordPerfect, CorelDRAW, FreeHand, Visio, Publisher and Mac Graphics. Librevenge has been inducted to LibreOffice project for file importer. All those converters merged into one executable plus an older companion WMF2SVG from the same developer and tiny emf2wmf companion.

CDR TO SVG
revconv -o file.svg file.cdr

WPD TO SVG
revconv -o file.svg  file.wpd

See RSVG-Convert for post conversion

Download
revconv.exe 3.4 MB
emf2wmf.exe 64 KB
wmf2svg.exe 262 KB
wmf2svg.7z 580 KB (fonts for wmf2svg)

Sources
sourceforge.net/p/libwpd/librevenge


HTMLDoc
Small but useful HTML to PDF Converter which often used as webserver backend. HTMLDoc could create indexed HTML too. This one is portable build (no need to specify --datadir). Note that the project has been left by original developers and become less active.

HTML TO PDF
htmldoc -f file.pdf  file.html

See Poppler for inverse/post conversion

Download
htmldoc.exe 265 KB (version 1.8.28)
htmldoc.7z 1.9 MB (fonts and data)

Sources
www.msweet.org/downloads.php/HTMLDOC


Graphviz  (fc)
Popular graph renderer for Linux platform, not quite popular in Windows. Provided here as static build DOT only executable, somehow I found official build have broken Unicode (maybe obsolete pango) while this one works.

Download
dot.exe 3 MB (version 2.38)

Sources
www.graphviz.org/pub/graphviz/ARCHIVE

1 comment:

  1. The best article I came across a number of years, write something about it on this page. my converter

    ReplyDelete