Macに初めから付属している qlmanage コマンドを使います。
Macのクイックルックという機能で表示した結果をPNG画像で出力します。
qlmanage -t -s 512 -o ./output_dir target.svg
参考: Macのクイックルックでファイルを表示する/編集する
ヘルプ
Usage: qlmanage [OPTIONS] path...
-h Display this help
-r Force reloading Generators list
-r cache Reset thumbnail disk cache
-m [name ...] Display statistics about quicklookd. Stats names:
* plugins Show the generators list
* server Show quicklookd life information
* memory Show quicklookd memory consumption
* burst Show statistics about the last burst
* threads Show concurrent accesses stats
* other Show other information about quicklookd
-p Compute previews of the documents
-t Compute thumbnails of the documents
-x Use quicklookd (remote computation)
-i Compute thumbnail in icon mode
-s size Size for the thumbnail
-f factor Scale factor for the thumbnail
-F factor Scale factor for the thumbnail, draw downscaled and compare to 1x
-z Display generation performance info (don't display thumbnails)
-o dir Output result in dir (don't display thumbnails or previews)
-c contentType Force the content type used for the documents
-g generator Force the generator to use
manページ
qlmanage(1) General Commands Manual qlmanage(1)
NAME
qlmanage – Quick Look Server debug and management tool
SYNOPSIS
qlmanage -r
qlmanage -m [name ...]
qlmanage -t [-x] [-i] [-s size] [-f factor] [-c contentTypeUTI [-g generator]]
[file ...]
qlmanage -p [-x] [-c contentTypeUTI [-g generator]] [file ...]
qlmanage -h
DESCRIPTION
qlmanage allows you to test your Quick Look generators and manage Quick Look
Server.
The following usages are available:
1. qlmanage -r resets Quick Look Server and all Quick Look client's
generator cache.
2. qlmanage -m gets all sort of information on Quick Look server
including the list of detected generators.
3. qlmanage -t displays the Quick Look generated thumbnails (if
available) for the specified files.
4. qlmanage -p displays the Quick Look generated previews for the
specified files.
5. qlmanage -h displays extensive help.
Mac OS X March 29, 2007 Mac OS X