diff options
| author | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-01-01 11:40:09 +0000 |
|---|---|---|
| committer | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-01-01 11:40:09 +0000 |
| commit | 7ed83b6c6666eb8b6b104c211ae7e52907350372 (patch) | |
| tree | 4430b556abac0ad660a0aacf1887d77f85d8be02 /scribus/util_ghostscript.h | |
| download | scribus-7ed83b6c6666eb8b6b104c211ae7e52907350372.tar.gz scribus-7ed83b6c6666eb8b6b104c211ae7e52907350372.tar.xz scribus-7ed83b6c6666eb8b6b104c211ae7e52907350372.zip | |
Branch 1.3.5 tree to 1.4.x tree, goodbye 1.3.x
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17163 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/util_ghostscript.h')
| -rw-r--r-- | scribus/util_ghostscript.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/scribus/util_ghostscript.h b/scribus/util_ghostscript.h new file mode 100644 index 0000000..dfe1a28 --- /dev/null +++ b/scribus/util_ghostscript.h @@ -0,0 +1,56 @@ +/* +For general Scribus (>=1.3.2) copyright and licensing information please refer +to the COPYING file provided with the program. Following this notice may exist +a copyright and/or license notice that predates the release of Scribus 1.3.2 +for which a new license (GPL+exception) is in place. +*/ + +/*! + * @brief GS utility fucntions + * Moved functions written or modified by various people over the time from util.cpp + * + * @author Craig Bradney + */ +#ifndef _GSUTIL_H +#define _GSUTIL_H + +#include <QMap> +#include <QPixmap> +#include <QString> +#include <QStringList> + +#include "scribusapi.h" + +QPixmap SCRIBUS_API LoadPDF(QString fn, int Page, int Size, int *w, int *h); +/** + * @brief Call GhostScript synchronously and store output + * + * The gs commands are all similar and consist of a few constant + * arguments, the variable arguments and the end arguments which + * are also invariant. It will always use -q -dNOPAUSE and + * will always end with -c showpage -c quit. It also does automatic + * device selection unless overridden, and uses the user's antialiasing + * preferences and font search path. + * + * Shell metacharacters are not expanded - that includes quotes. + * @sa System . + * + * @param args_in Custom arguments to GhostScript + * @param device GS device to use (defaults to an image device if omitted) + */ +int SCRIBUS_API callGS(const QStringList& args_in, const QString device=""); +int SCRIBUS_API callGS(const QString& args_in, const QString device=""); +int SCRIBUS_API convertPS2PS(QString in, QString out, const QStringList& opts, int level); +int SCRIBUS_API convertPS2PDF(QString in, QString out, const QStringList& opts); +bool SCRIBUS_API testGSAvailability( void ); +bool SCRIBUS_API testGSAvailability( const QString& gsPath ); +bool SCRIBUS_API testGSDeviceAvailability( const QString& device ); +/*! \brief Return gs version. If gs couldn't be found or there was a problem parsing output, return false + (in which case minor and major have undefined values). + \retval QString version or false on error */ +QString SCRIBUS_API getGSVersion(); +bool SCRIBUS_API getNumericGSVersion(int & major, int & minor); +bool SCRIBUS_API getNumericGSVersion(const QString& ver, int&major, int& minor); +QString SCRIBUS_API getGSDefaultExeName(void); +QMap<int, QString> SCRIBUS_API getGSExePaths(const QString& regKey); +#endif |
