Skip to content

Commit 616dc2a

Browse files
committed
Fix a potential margin issue for A4 PCL output from ipptransform.
1 parent f633fe8 commit 616dc2a

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ v3.0.2 - YYYY-MM-DD
77
- Updated `ipptool` to limit the range of supported raster resolutions for the
88
generated test page content from 1 to 9600dpi.
99
- Fixed a recursion issue with encoding of nested collections.
10+
- Fixed a potential margin issue when generating A4 PCL from `ipptransform`.
1011

1112

1213
v3.0.1 - 2026-04-09

tools/ipptransform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2320,7 +2320,7 @@ pcl_start_page(xform_raster_t *ras, // I - Raster information
23202320
ras->top = ras->header.HWResolution[1] / 6;
23212321
ras->bottom = ras->header.cupsHeight - ras->header.HWResolution[1] / 6;
23222322

2323-
if (ras->header.PageSize[1] == 841 || ras->header.PageSize[1] == 842)
2323+
if ((ras->header.PageSize[1] == 841 || ras->header.PageSize[1] == 842) && ras->header.cupsWidth >= (8 * ras->header.HWResolution[0]))
23242324
{
23252325
// A4 gets special side margins to expose an 8" print area
23262326
ras->left = (ras->header.cupsWidth - 8 * ras->header.HWResolution[0]) / 2;

0 commit comments

Comments
 (0)