Rev 4507 | Rev 5772 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4507 | cbradney | 1 | /* |
2 | For general Scribus (>=1.3.2) copyright and licensing information please refer |
||
3 | to the COPYING file provided with the program. Following this notice may exist |
||
4 | a copyright and/or license notice that predates the release of Scribus 1.3.2 |
||
5 | for which a new license (GPL+exception) is in place. |
||
6 | */ |
||
7 | |||
8 | /*! |
||
9 | * @brief GS utility fucntions |
||
10 | * Moved functions written or modified by various people over the time from util.cpp |
||
11 | * |
||
12 | * @author Craig Bradney |
||
13 | */ |
||
14 | #ifndef _GSUTIL_H |
||
15 | #define _GSUTIL_H |
||
16 | |||
17 | #include <qpixmap.h> |
||
18 | #include <qstring.h> |
||
19 | #include <qstringlist.h> |
||
20 | |||
21 | #include "scribusapi.h" |
||
22 | |||
23 | QPixmap SCRIBUS_API LoadPDF(QString fn, int Page, int Size, int *w, int *h); |
||
24 | /** |
||
25 | * @brief Call GhostScript synchronously and store output |
||
26 | * |
||
27 | * The gs commands are all similar and consist of a few constant |
||
28 | * arguments, the variable arguments and the end arguments which |
||
29 | * are also invariant. It will always use -q -dNOPAUSE and |
||
30 | * will always end with -c showpage -c quit. It also does automatic |
||
31 | * device selection unless overridden, and uses the user's antialiasing |
||
32 | * preferences and font search path. |
||
33 | * |
||
34 | * Shell metacharacters are not expanded - that includes quotes. |
||
35 | * @sa System . |
||
36 | * |
||
37 | * @param args_in Custom arguments to GhostScript |
||
38 | * @param device GS device to use (defaults to an image device if omitted) |
||
39 | */ |
||
40 | int SCRIBUS_API callGS(const QStringList& args_in, const QString device=""); |
||
41 | int SCRIBUS_API callGS(const QString& args_in, const QString device=""); |
||
42 | int SCRIBUS_API convertPS2PS(QString in, QString out, const QStringList& opts, int level); |
||
43 | int SCRIBUS_API testGSAvailability( void ); |
||
44 | int SCRIBUS_API testGSDeviceAvailability( QString device ); |
||
45 | /*! \brief Return gs version. If gs couldn't be found or there was a problem parsing output, return false |
||
46 | (in which case minor and major have undefined values). |
||
47 | \retval QString version or false on error */ |
||
48 | QString SCRIBUS_API getGSVersion(); |
||
49 | bool SCRIBUS_API getNumericGSVersion(int & major, int & minor); |
||
50 | QString SCRIBUS_API getGSDefaultExeName(void); |
||
51 | #endif |