Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

util_ghostscript.h File Reference

#include <QMap>
#include <QPixmap>
#include <QString>
#include <QStringList>
#include "scribusapi.h"

Include dependency graph for util_ghostscript.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

QPixmap SCRIBUS_API LoadPDF (QString fn, int Page, int Size, int *w, int *h)
 GS utility fucntions Moved functions written or modified by various people over the time from util.cpp.
int SCRIBUS_API callGS (const QStringList &args_in, const QString device="")
 Call GhostScript synchronously and store output.
int SCRIBUS_API callGS (const QString &args_in, const QString device="")
int SCRIBUS_API convertPS2PS (QString in, QString out, const QStringList &opts, int level)
bool SCRIBUS_API testGSAvailability (void)
bool SCRIBUS_API testGSAvailability (const QString &gsPath)
bool SCRIBUS_API testGSDeviceAvailability (const QString &device)
QString SCRIBUS_API getGSVersion ()
 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).
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)


Function Documentation

int SCRIBUS_API callGS ( const QString &  args_in,
const QString  device = "" 
)

int SCRIBUS_API callGS ( const QStringList &  args_in,
const QString  device = "" 
)

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.

See also:
System .
Parameters:
args_in Custom arguments to GhostScript
device GS device to use (defaults to an image device if omitted)

Definition at line 51 of file util_ghostscript.cpp.

References PrefsManager::appPrefs, args, ScPaths::envPathSeparator, PrefsTable::get(), PrefsFile::getContext(), PrefsTable::getRowCount(), getShortPathName(), PrefsContext::getTable(), PrefsManager::ghostscriptExecutable(), ApplicationPrefs::gs_AntiAliasGraphics, ApplicationPrefs::gs_AntiAliasText, ScribusCore::havePNGAlpha(), PrefsManager::instance(), PrefsManager::prefsFile, ScCore, and System().

Referenced by ScImgDataLoader_PS::loadDCS1(), ScImgDataLoader_PS::loadDCS2(), LoadPDF(), ScImgDataLoader_PS::loadPhotoshop(), ScImgDataLoader_PS::loadPicture(), ScImgDataLoader_PDF::loadPicture(), BarcodeGenerator::paintBarcode(), ScImgDataLoader_PS::preloadAlphaChannel(), and ScImgDataLoader_PDF::preloadAlphaChannel().

int SCRIBUS_API convertPS2PS ( QString  in,
QString  out,
const QStringList &  opts,
int  level 
)

QString SCRIBUS_API getGSDefaultExeName ( void   ) 

QMap<int, QString> SCRIBUS_API getGSExePaths ( const QString &  regKey  ) 

QString SCRIBUS_API getGSVersion (  ) 

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).

Return values:
QString version or false on error

Definition at line 203 of file util_ghostscript.cpp.

References args, getShortPathName(), and PrefsManager::instance().

Referenced by About::About(), and getNumericGSVersion().

bool SCRIBUS_API getNumericGSVersion ( const QString &  ver,
int &  major,
int &  minor 
)

Definition at line 226 of file util_ghostscript.cpp.

bool SCRIBUS_API getNumericGSVersion ( int &  major,
int &  minor 
)

QPixmap SCRIBUS_API LoadPDF ( QString  fn,
int  Page,
int  Size,
int *  w,
int *  h 
)

GS utility fucntions Moved functions written or modified by various people over the time from util.cpp.

Author:
Craig Bradney

Definition at line 339 of file util_ghostscript.cpp.

References args, callGS(), ScPaths::getTempFileDir(), and p.

Referenced by Navigator::Navigator(), and Navigator::SetSeite().

bool SCRIBUS_API testGSAvailability ( const QString &  gsPath  ) 

Definition at line 175 of file util_ghostscript.cpp.

References args, and getShortPathName().

bool SCRIBUS_API testGSAvailability ( void   ) 

bool SCRIBUS_API testGSDeviceAvailability ( const QString &  device  ) 

Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.