--- NEWS.orig 2003-03-13 11:09:09.000000000 +0000 +++ NEWS 2003-03-13 11:08:45.000000000 +0000 @@ -1,6 +1,15 @@ This file describes recent user-visible changes in groff. Bug fixes are not described. There are more details in the man and info pages. +Grops +----- + +o If the area of the paper is defined as zero, no paper size declaration will + be given, and the following warning messages will appear as appropriate: + "paper height is zero" + "paper width is zero" + + VERSION 1.18.2 ============== --- src/devices/grops/ps.cc.orig 2003-03-13 11:09:13.000000000 +0000 +++ src/devices/grops/ps.cc 2003-03-13 11:04:48.000000000 +0000 @@ -1302,9 +1302,18 @@ .comment_arg("*PageSize") .comment_arg(media_name()) .end_comment(); + + int w = media_width(); + int h = media_height(); + if (w > 0 && h > 0) { + /* + * only tell postscript about size if area is non-zero + * warning to user done elsewhere + */ fprintf(out.get_file(), "<< /PageSize [ %d %d ] /ImagingBBox null >> setpagedevice\n", media_width(), media_height()); + } out.simple_comment("EndFeature"); } } @@ -1396,15 +1405,22 @@ .end_comment(); if (!(broken_flags & NO_PAPERSIZE)) { + int w = media_width(); + int h = media_height(); + if (w > 0 && h > 0) { fprintf(out.get_file(), "%%%%DocumentMedia: %s %d %d %d %s %s\n", media_name(), // tag name of media - media_width(), // media width - media_height(), // media height + w, // media width + h, // media height 0, // weight in g/m2 "()", // paper color, e.g. white "()" // preprinted form type ); + } else { + if (h <= 0) warning("paper height is zero"); + if (w <= 0) warning("paper width is zero"); + } } out.begin_comment("Orientation:")