Skip to content

Commit 7ea2f68

Browse files
committed
Add size check to A4 support (Issue #1544)
1 parent f2c41a8 commit 7ea2f68

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ v2.5b1 - YYYY-MM-DD
167167
- Fixed allowed values for directive `FilterNice`
168168
- Fixed an allocation bug in the `rastertoepson` filter (Issue #1537)
169169
- Fixed a range check when loading cached SNMP supply information (Issue #1538)
170+
- Fixed A4 support in the `ippevepcl` program (Issue #1544)
170171
- Removed hash support for SHA2-512-224 and SHA2-512-256.
171172
- Removed `mantohtml` script for generating html pages (use
172173
`https://www.msweet.org/mantohtml/`)

tools/ippevepcl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Generic HP PCL printer command for ippeveprinter/CUPS.
33
*
4-
* Copyright © 2020-2025 by OpenPrinting.
4+
* Copyright © 2020-2026 by OpenPrinting.
55
* Copyright © 2019 by Apple Inc.
66
*
77
* Licensed under Apache License v2.0. See the file "LICENSE" for more
@@ -129,7 +129,7 @@ pcl_start_page(
129129
pcl_top = header->HWResolution[1] / 6;
130130
pcl_bottom = header->cupsHeight - header->HWResolution[1] / 6 - 1;
131131

132-
if (header->PageSize[1] == 842)
132+
if (header->PageSize[1] == 842 && header->cupsWidth >= (8 * header->HWResolution[0]))
133133
{
134134
/* A4 gets special side margins to expose an 8" print area */
135135
pcl_left = (header->cupsWidth - 8 * header->HWResolution[0]) / 2;

0 commit comments

Comments
 (0)