]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Add size check to A4 support (Issue #1544)
authorMichael R Sweet <msweet@msweet.org>
Mon, 13 Apr 2026 17:58:16 +0000 (13:58 -0400)
committerMichael R Sweet <msweet@msweet.org>
Mon, 13 Apr 2026 17:58:16 +0000 (13:58 -0400)
CHANGES.md
tools/ippevepcl.c

index eb6ff7ad31895c3555cb46d24463d26d6856c884..420b1c79c2119828b20ae6a78597588d4534c320 100644 (file)
@@ -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/`)
index bade57351fcb1e4e57a3532d2d6e09a9155f1906..f20940a192b88816248b6e82a223e7ac689fb16f 100644 (file)
@@ -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;