From: Michael R Sweet Date: Mon, 13 Apr 2026 17:58:16 +0000 (-0400) Subject: Add size check to A4 support (Issue #1544) X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7ea2f6888d473c14a2233f3c6f98a3dd993fc35e;p=thirdparty%2Fcups.git Add size check to A4 support (Issue #1544) --- diff --git a/CHANGES.md b/CHANGES.md index eb6ff7ad31..420b1c79c2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -167,6 +167,7 @@ v2.5b1 - YYYY-MM-DD - Fixed allowed values for directive `FilterNice` - Fixed an allocation bug in the `rastertoepson` filter (Issue #1537) - Fixed a range check when loading cached SNMP supply information (Issue #1538) +- Fixed A4 support in the `ippevepcl` program (Issue #1544) - Removed hash support for SHA2-512-224 and SHA2-512-256. - Removed `mantohtml` script for generating html pages (use `https://www.msweet.org/mantohtml/`) diff --git a/tools/ippevepcl.c b/tools/ippevepcl.c index bade57351f..f20940a192 100644 --- a/tools/ippevepcl.c +++ b/tools/ippevepcl.c @@ -1,7 +1,7 @@ /* * Generic HP PCL printer command for ippeveprinter/CUPS. * - * Copyright © 2020-2025 by OpenPrinting. + * Copyright © 2020-2026 by OpenPrinting. * Copyright © 2019 by Apple Inc. * * Licensed under Apache License v2.0. See the file "LICENSE" for more @@ -129,7 +129,7 @@ pcl_start_page( pcl_top = header->HWResolution[1] / 6; pcl_bottom = header->cupsHeight - header->HWResolution[1] / 6 - 1; - if (header->PageSize[1] == 842) + if (header->PageSize[1] == 842 && header->cupsWidth >= (8 * header->HWResolution[0])) { /* A4 gets special side margins to expose an 8" print area */ pcl_left = (header->cupsWidth - 8 * header->HWResolution[0]) / 2;