diff options
-rw-r--r-- | src/PSEditor.cxx | 4 | ||||
-rw-r--r-- | src/Postscript.cxx | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/PSEditor.cxx b/src/PSEditor.cxx index f6d0317..bc50b59 100644 --- a/src/PSEditor.cxx +++ b/src/PSEditor.cxx @@ -1,5 +1,5 @@ // -// "$Id: PSEditor.cxx,v 1.3 2004/07/09 21:27:00 hofmann Exp $" +// "$Id: PSEditor.cxx,v 1.4 2004/07/09 22:51:39 hofmann Exp $" // // PSEditor routines. // @@ -137,7 +137,7 @@ int PSEditor::save(const char* savefile) { FILE *fp = fdopen(tmp_fd, "r"); rewind(fp); FILE *sfp = fopen(savefile, "w"); - PSWriter *pw = new PSLevel1Writer(this); + PSWriter *pw = new PSLevel2Writer(this); pw->write(fp, sfp); diff --git a/src/Postscript.cxx b/src/Postscript.cxx index 74ddee6..bb15312 100644 --- a/src/Postscript.cxx +++ b/src/Postscript.cxx @@ -1,5 +1,5 @@ // -// "$Id: Postscript.cxx,v 1.4 2004/07/09 21:27:01 hofmann Exp $" +// "$Id: Postscript.cxx,v 1.5 2004/07/09 22:51:39 hofmann Exp $" // // Postscript handling routines. // @@ -301,6 +301,7 @@ char * PSLevel1Writer::ps_header() { "/PSEditWidgetPC 0 def\n" \ "/PSEditWidgetshowpage /showpage load def\n" \ "/showpage {\n" \ + "gsave initgraphics\n" \ "PSEditWidgetPageCount 0 eq { \n" \ "/PSEditWidgetPC PSEditWidgetPC 1 add def PSEditWidgetPC\n" \ "} {\n" \ @@ -309,7 +310,7 @@ char * PSLevel1Writer::ps_header() { } char * PSLevel1Writer::ps_trailer() { - return "PSEditWidgetshowpage} def\n"; + return "PSEditWidgetshowpage grestore} def\n"; } @@ -319,6 +320,7 @@ char * PSLevel2Writer::ps_header() { return \ "/PSEditWidgetPageCount 0 def\n" \ "<< /EndPage {\n" \ + "gsave initgraphics\n" \ "pop\n" \ "PSEditWidgetPageCount 0 eq { \n" \ "1 add %% use showpage counter instead.\n" \ @@ -329,5 +331,5 @@ char * PSLevel2Writer::ps_header() { } char * PSLevel2Writer::ps_trailer() { - return "true } >> setpagedevice\n"; + return "grestore true } >> setpagedevice\n"; } |