diff --git a/base/gdevpx.c b/base/gdevpx.c
index 191e585..7986167 100644
--- a/base/gdevpx.c
+++ b/base/gdevpx.c
@@ -32,7 +32,8 @@
 #include "gdevpxop.h"
 #include "gdevpxut.h"
 #include "gxlum.h"
-
+#include "gdevpcl.h"
+#include "gdevprn.h"
 
 /* ---------------- Device definition ---------------- */
 
@@ -476,8 +477,9 @@ pclxl_write_begin_image(gx_device_pclxl * xdev, uint width, uint height,
 
 /* Write rows of an image. */
 /****** IGNORES data_bit ******/
+#if 0 /* switch to DeltaRow version */
 static void
-pclxl_write_image_data(gx_device_pclxl * xdev, const byte * data, int data_bit,
+pclxl_write_image_data_RLE(gx_device_pclxl * xdev, const byte * data, int data_bit,
 		       uint raster, uint width_bits, int y, int height)
 {
     stream *s = pclxl_stream(xdev);
@@ -558,6 +560,53 @@ pclxl_write_image_data(gx_device_pclxl * xdev, const byte * data, int data_bit,
 	px_put_bytes(s, (const byte *)"\000\000\000\000", -(int)width_bytes & 3);
     }
 }
+#endif /* switch to DeltaRow */
+
+/* DeltaRow compression (also called "mode 3" */
+/* drawn heavily from gdevcljc.c:cljc_print_page(),
+   This is simplier since PCL XL does not allow
+   compression mix-and-match.
+
+   worse case of RLE is + 1/128, but worse case of DeltaRow is + 1/8
+ */
+static void
+pclxl_write_image_data(gx_device_pclxl * xdev, const byte * data, int data_bit,
+		       uint raster, uint width_bits, int y, int height)
+{
+    stream *s = pclxl_stream(xdev);
+    uint width_bytes = (width_bits + 7) >> 3;
+    int worst_case_comp_size = raster + (raster / 8) + 1;
+    byte *cdata = 0;
+    byte *prow = 0;
+    int i;
+    int count;
+
+    px_put_usa(s, y, pxaStartLine);
+    px_put_usa(s, height, pxaBlockHeight);
+    /* allocate the worst case scenario; PCL XL has an extra 2 byte per row compared to PCL5 */
+    byte *buf = gs_alloc_bytes(xdev->v_memory, (worst_case_comp_size + 2)* height,
+                               "pclxl_write_image_data(buf)");
+    prow = gs_alloc_bytes(xdev->v_memory, width_bytes, "pclxl_write_image_data(prow)");
+    /* initialize the seed row */
+    memset(prow, 0, width_bytes);
+    cdata = buf;
+    for (i = 0; i < height; i++) {
+      int compressed_size = gdev_pcl_mode3compress(raster, data + i * raster, prow, cdata + 2);
+      /* PCL XL prepends row data with count */
+      *cdata = compressed_size & 0xff;
+      *(cdata+1) = compressed_size >> 8;
+      cdata += compressed_size + 2;
+    }
+    px_put_ub(s, eDeltaRowCompression);
+    px_put_ac(s, pxaCompressMode, pxtReadImage);
+    count = cdata - buf;
+    px_put_data_length(s, count);
+    px_put_bytes(s, buf, count);
+
+    gs_free_object(xdev->v_memory, buf, "pclxl_write_image_data(buf)");
+    gs_free_object(xdev->v_memory, prow, "pclxl_write_image_data(prow)");
+    return;
+}
 
 /* End an image. */
 static void
