diff --git a/xcpt.c b/xcpt.c
index 708ad34820f3b1ab72c596270cd9d669bbc732a2..4b8c38204c6fbce4f09a07df21a11773d8cac20d 100644
--- a/xcpt.c
+++ b/xcpt.c
@@ -88,8 +88,8 @@ static char *xstrdup(const char *x)
 	O(INPUTTRAY, "automatic") \
 	O(TRAYFEED, "stack") \
 	O(MEDIATYPE, "system-default") \
-	O(MEDIAXSIZE, "21000") \
-	O(MEDIAYSIZE, "29700") \
+	O(MEDIAXSIZE, "595") \
+	O(MEDIAYSIZE, "842") \
 	O(FINISH_STAPLE, "") \
 	O(FINISH_PUNCH, "") \
 	O(FINISH_FOLD, "") \
@@ -307,6 +307,17 @@ static void xcpt_integer(const char *name, int value)
   xcpt_printf("<%s syntax=\"integer\">%d</%s>", name, value, name);
 }
 
+static void xcpt_dimension(const char *name, int pt)
+{
+  /*
+   *  We get dimensions in PostScript points (1/72 in).
+   *  Xerox printers expect them in 100th's of mm, but
+   *  last two digits must be 0.
+   */
+  double m = pt * (25.4 / 72.) + 0.5;
+  xcpt_integer(name, 100 * (int)m);
+}
+
 static void xcpt_keyword(const char *name, const char *value)
 {
   xcpt_printf("<%s syntax=\"keyword\">%s</%s>", name, value, name);
@@ -456,8 +467,8 @@ static void gen_job_template(void)
     xcpt_keyword("tray-feed", OPT(TRAYFEED));
     xcpt_keyword("media-color", OPT(MEDIACOLOR));
     xcpt_collection_open("media-size");
-      xcpt_integer("x-dimension", OPT_INT(MEDIAXSIZE));
-      xcpt_integer("y-dimension", OPT_INT(MEDIAYSIZE));
+      xcpt_dimension("x-dimension", OPT_INT(MEDIAXSIZE));
+      xcpt_dimension("y-dimension", OPT_INT(MEDIAYSIZE));
       xcpt_close();
     xcpt_keyword("media-type", OPT(MEDIATYPE));
     xcpt_close();