diff --git a/Graphics/gl2ps.cpp b/Graphics/gl2ps.cpp
index 3045517b93acfb4ea01024b2ec57ea9963771c9f..298043d200c2d207f478652475227522bde11e27 100644
--- a/Graphics/gl2ps.cpp
+++ b/Graphics/gl2ps.cpp
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.cpp,v 1.99 2005-06-20 17:33:18 geuzaine Exp $ */
+/* $Id: gl2ps.cpp,v 1.100 2005-06-23 07:15:44 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
@@ -4672,17 +4672,19 @@ GL2PSDLL_API GLint gl2psEndPage(void)
 
   res = gl2psPrintPrimitives();
 
-  switch(gl2ps->format){
-  case GL2PS_TEX :
-    gl2psPrintTeXFooter();
-    break;
-  case GL2PS_PS :
-  case GL2PS_EPS :
-    gl2psPrintPostScriptFooter();
-    break;
-  case GL2PS_PDF :
-    gl2psPrintPDFFooter();
-    break;
+  if(res != GL2PS_OVERFLOW){
+    switch(gl2ps->format){
+    case GL2PS_TEX :
+      gl2psPrintTeXFooter();
+      break;
+    case GL2PS_PS :
+    case GL2PS_EPS :
+      gl2psPrintPostScriptFooter();
+      break;
+    case GL2PS_PDF :
+      gl2psPrintPDFFooter();
+      break;
+    }
   }
 
   fflush(gl2ps->stream);
diff --git a/Graphics/gl2ps.h b/Graphics/gl2ps.h
index 04d369b486c105759ae686218dd48e2d3fbd42ea..cc46824eeb12644e45dfe2b23dba782156615e1b 100644
--- a/Graphics/gl2ps.h
+++ b/Graphics/gl2ps.h
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.h,v 1.60 2005-06-18 18:41:28 geuzaine Exp $ */
+/* $Id: gl2ps.h,v 1.61 2005-06-23 07:15:44 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2005 Christophe Geuzaine <geuz@geuz.org>
@@ -77,7 +77,7 @@
 
 #define GL2PS_MAJOR_VERSION 1
 #define GL2PS_MINOR_VERSION 2
-#define GL2PS_PATCH_VERSION 5
+#define GL2PS_PATCH_VERSION 6
 
 #define GL2PS_VERSION (GL2PS_MAJOR_VERSION + \
                        0.01 * GL2PS_MINOR_VERSION + \