2006-07-15 19:41:30 +00:00
|
|
|
|
#!/usr/bin/env python
|
2006-07-17 19:46:03 +00:00
|
|
|
|
# -*- coding: iso-8859-1 -*-
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
2006-07-15 15:42:50 +00:00
|
|
|
|
# file convertDefault.py
|
2003-08-22 10:50:02 +00:00
|
|
|
|
# This file is part of LyX, the document processor.
|
|
|
|
|
# Licence details can be found in the file COPYING.
|
|
|
|
|
|
2006-07-15 15:42:50 +00:00
|
|
|
|
# \author Herbert Vo<56>
|
|
|
|
|
# \author Bo Peng
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
|
|
|
|
# Full author contact details are available in file CREDITS.
|
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
|
# The default converter if no other has been defined by the user from the
|
|
|
|
|
# Conversion->Converter tab of the Preferences dialog.
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
|
# The user can also redefine this default converter, placing their
|
|
|
|
|
# replacement in ~/.lyx/scripts
|
2003-08-22 10:50:02 +00:00
|
|
|
|
|
2003-01-13 23:35:18 +00:00
|
|
|
|
# converts an image from $1 to $2 format
|
2006-07-15 15:42:50 +00:00
|
|
|
|
import os, sys
|
2007-01-18 18:25:05 +00:00
|
|
|
|
if os.system(r'convert -define pdf:use-cropbox=true -depth 8 "%s" "%s"' % (sys.argv[1], sys.argv[2])) != 0:
|
2006-07-15 15:42:50 +00:00
|
|
|
|
print >> sys.stderr, sys.argv[0], 'ERROR'
|
|
|
|
|
print >> sys.stderr, 'Execution of "convert" failed.'
|
|
|
|
|
sys.exit(1)
|