diff --git a/Makefile b/Makefile
index 25e1b5cd7f69053c9a77bf5db272a805675f6312..d9b456b6792afa5274c132f6a090eff3f04ce4fa 100644
--- a/Makefile
+++ b/Makefile
@@ -20,6 +20,10 @@ clean:
 	rm -f *.tex *.ps *.eps *.eps.gz *.pdf *.o gl2psTest a.out *~
 	cd doc && ${MAKE} clean
 
+purge:
+	rm -f `find . -name "*~" -o -name "*~~" -o -name "\#*"\
+               -o -name ".\#*" -o -name "gmon.out"`
+
 mac:
 	gcc -Wall -g -o gl2psTest gl2psTest.c gl2ps.c\
             -framework OpenGL -framework GLUT -framework Cocoa
diff --git a/doc/Makefile b/doc/Makefile
index a93c38cb9e00c3d9fe3a4bc72be32de669cb721c..9dbd8e6424e699967814541891580f95f79a4d1a 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,16 +1,20 @@
 
-default:
+default: gl2ps.ps gl2ps.html gl2ps.pdf
+
+gl2ps.ps: gl2ps.tex
+	rm -f gl2ps.toc gl2ps.out gl2ps.aux
 	latex gl2ps
 	latex gl2ps
 	latex gl2ps
 	dvips gl2ps -o
-	make html
+
+gl2ps.pdf: gl2ps.tex
 	rm -f gl2ps.toc gl2ps.out gl2ps.aux
 	pdflatex gl2ps
 	pdflatex gl2ps
 	pdflatex gl2ps
 
-html:
+gl2ps.html: gl2ps.tex gl2ps.ps
 	rm -f gl2ps.html
 	echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">" >> gl2ps.html
 	echo "<html>" >> gl2ps.html
diff --git a/doc/gl2ps.tex b/doc/gl2ps.tex
index 5edbbc0a0a4c956e4c96551664b4b3bd0f60b12d..06f84ff1ae62aa8638f43a6c9b174bb067870ca8 100644
--- a/doc/gl2ps.tex
+++ b/doc/gl2ps.tex
@@ -1,4 +1,4 @@
-%  $Id: gl2ps.tex,v 1.169 2004-05-09 08:19:33 geuzaine Exp $
+%  $Id: gl2ps.tex,v 1.170 2004-05-09 18:06:01 geuzaine Exp $
 %
 %  GL2PS, an OpenGL to PostScript Printing Library
 %  Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
@@ -229,6 +229,9 @@ determine the way primitives are handled:
   the plotting of smooth shaded primitives but can lead to problems when
   converting PostScript files into PDF files. See also options \dd{nr},
   \dd{ng}, \dd{nb} below.
+\item[\dd{GL2PS_NO_BLENDING}] Blending (transparency) is disabled
+  alltogether (regardless of the current \dd{GL_BLEND} or \dd{GL2PS_BLEND}
+  status).
 \item[\dd{GL2PS_OCCLUSION_CULL}] All the hidden polygons are removed from
   the output, thus substantially reducing the size of the output file.
 \item[\dd{GL2PS_USE_CURRENT_VIEWPORT}] The current OpenGL viewport is used
@@ -540,8 +543,8 @@ glGetIntegerv(GL_VIEWPORT, viewport);
 while( state == GL2PS_OVERFLOW ){ 
   buffsize += 1024*1024;
   gl2psBeginPage ( "MyTitle", "MySoftware", viewport,
-                   GL2PS_EPS, GL2PS_BSP_SORT,
-                   GL2PS_SIMPLE_LINE_OFFSET | GL2PS_SILENT |
+                   GL2PS_EPS, GL2PS_BSP_SORT, GL2PS_SILENT |
+                   GL2PS_SIMPLE_LINE_OFFSET | GL2PS_NO_BLENDING |
                    GL2PS_OCCLUSION_CULL | GL2PS_BEST_ROOT,
                    GL_RGBA, 0, NULL, 0, 0, 0, buffsize,
                    fp, NULL );
diff --git a/gl2ps.c b/gl2ps.c
index a86e1245a8b33ea3e8cb504c6ce6a56fb4e53d8e..bd1eb1895d8c8419cca3233f1c84498aa2c2d18f 100644
--- a/gl2ps.c
+++ b/gl2ps.c
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.c,v 1.172 2004-05-09 16:35:27 geuzaine Exp $ */
+/* $Id: gl2ps.c,v 1.173 2004-05-09 18:06:01 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
@@ -687,7 +687,7 @@ static void gl2psAdaptVertexForBlending(GL2PSvertex *v)
   if(!v || !gl2ps)
     return;
   
-  if(GL_FALSE == gl2ps->blending){
+  if(gl2ps->options & GL2PS_NO_BLENDING || !gl2ps->blending){
     v->rgba[3] = 1.0F;
     return;
   }
@@ -4399,12 +4399,7 @@ GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
 
   switch(format){
   case GL_RGBA:
-    if(GL_TRUE == glIsEnabled(GL_BLEND)){
-      size = height * width * 4;
-      prim->data.image->pixels = (GLfloat*)gl2psMalloc(size * sizeof(GLfloat));
-      memcpy(prim->data.image->pixels, pixels, size * sizeof(GLfloat));
-    }
-    else{
+    if(gl2ps->options & GL2PS_NO_BLENDING || !gl2ps->blending){
       /* special case: blending turned off */
       prim->data.image->format = GL_RGB;
       size = height * width * 3;
@@ -4416,6 +4411,11 @@ GL2PSDLL_API GLint gl2psDrawPixels(GLsizei width, GLsizei height,
           ++piv;
       }   
     }
+    else{
+      size = height * width * 4;
+      prim->data.image->pixels = (GLfloat*)gl2psMalloc(size * sizeof(GLfloat));
+      memcpy(prim->data.image->pixels, pixels, size * sizeof(GLfloat));
+    }
     break;
   case GL_RGB:
   default:
diff --git a/gl2ps.h b/gl2ps.h
index da014a6f7e9481eb1d23e1f81d8d979662ca179e..a92bb1fe0de366f59576f1a9c50479b12a5ef189 100644
--- a/gl2ps.h
+++ b/gl2ps.h
@@ -1,4 +1,4 @@
-/* $Id: gl2ps.h,v 1.86 2004-03-17 17:02:39 geuzaine Exp $ */
+/* $Id: gl2ps.h,v 1.87 2004-05-09 18:06:01 geuzaine Exp $ */
 /*
  * GL2PS, an OpenGL to PostScript Printing Library
  * Copyright (C) 1999-2004 Christophe Geuzaine <geuz@geuz.org>
@@ -123,6 +123,7 @@
 #define GL2PS_NO_PIXMAP            (1<<8)
 #define GL2PS_USE_CURRENT_VIEWPORT (1<<9)
 #define GL2PS_COMPRESS             (1<<10)
+#define GL2PS_NO_BLENDING          (1<<11)
 
 /* Arguments for gl2psEnable/gl2psDisable */