Commit 4554ddbf authored by Pino Toscano's avatar Pino Toscano

Patch by Luigi Toscano <luigi.toscano@tiscali.it> to reactivate the rendering...

Patch by Luigi Toscano <luigi.toscano@tiscali.it> to reactivate the rendering of postscript specials.
Thanks Luigi.
CCMAIL: luigi.toscano@tiscali.it

BUG: 154507

svn path=/trunk/KDE/kdegraphics/okular/; revision=754951
parent ca5b6e62
......@@ -59,7 +59,7 @@ dviRenderer::dviRenderer()
editorCommand(""),
PostScriptOutPutString(0),
PS_interface(new ghostscript_interface),
_postscript(false),
_postscript(true),
line_boundary_encountered(false),
word_boundary_encountered(false),
current_page(0),
......
......@@ -18,12 +18,12 @@
#include <klocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <ktemporaryfile.h>
#include <kurl.h>
#include <QDir>
#include <QPainter>
#include <QPixmap>
#include <QTemporaryFile>
#include <QTextStream>
#include <QTimer>
......@@ -158,7 +158,9 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
// Generate a PNG-file
// Step 1: Write the PostScriptString to a File
QTemporaryFile PSfile;
KTemporaryFile PSfile;
PSfile.setAutoRemove(false);
PSfile.setSuffix(".ps");
PSfile.open();
const QString PSfileName = PSfile.fileName();
......@@ -230,15 +232,14 @@ void ghostscript_interface::gs_generate_graphics_file(const PageNumber& page, co
#endif
proc << argus;
proc.start();
if (!proc.waitForStarted()) {
int res = proc.execute();
if ( res ) {
// Starting ghostscript did not work.
// TODO: Issue error message, switch PS support off.
kError(kvs::dvi) << "ghostview could not be started" << endl;
} else {
while(!proc.waitForFinished(10))
qApp->processEvents();
}
PSfile.remove();
// Check if gs has indeed produced a file.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment