2185675 - Edges cropped when printing PostScript document

Resolves: rhbz#2185675
This commit is contained in:
Zdenek Dohnal 2023-04-13 15:45:47 +02:00
parent ab09b61326
commit 4cd786b89f
2 changed files with 21 additions and 1 deletions

View File

@ -11,7 +11,7 @@
Summary: OpenPrinting CUPS filters and backends
Name: cups-filters
Version: 1.20.0
Release: 29%{?dist}
Release: 30%{?dist}
# For a breakdown of the licensing, see COPYING file
# GPLv2: filters: commandto*, imagetoraster, pdftops, rasterto*,
@ -63,6 +63,8 @@ Patch14: 0001-cups-browsed-Always-save-.-default-option-entries-fr.patch
Patch15: cups-browsed-renew.patch
# 1981612 - [RHEL 8] pdftopdf doesn't handle "page-range=10-2147483647" correctly
Patch16: 0001-libcupsfilters-Fix-page-range-like-10-in-pdftopdf-fi.patch
# 2185675 - Edges cropped when printing PostScript document
Patch17: gstoraster-margins.patch
%if %{with braille}
Recommends: %{name}-braille%{?_isa} = %{version}-%{release}
@ -233,6 +235,8 @@ The package provides filters and cups-brf backend needed for braille printing.
%patch15 -p1 -b .renew
# 1981612 - [RHEL 8] pdftopdf doesn't handle "page-range=10-2147483647" correctly
%patch16 -p1 -b .ranges
# 2185675 - Edges cropped when printing PostScript document
%patch17 -p1 -b .margins
%build
@ -435,6 +439,9 @@ make check
%endif
%changelog
* Thu Apr 13 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-30
- 2185675 - Edges cropped when printing PostScript document
* Thu Sep 22 2022 Zdenek Dohnal <zdohnal@redhat.com> - 1.20.0-29
- 2128539 - build braille subpackage only on Fedora and CentOS Stream > 9

13
gstoraster-margins.patch Normal file
View File

@ -0,0 +1,13 @@
diff --git a/filter/gstoraster.c b/filter/gstoraster.c
index 7fd9ccf..0c9f37d 100644
--- a/filter/gstoraster.c
+++ b/filter/gstoraster.c
@@ -906,7 +906,7 @@ main (int argc, char **argv, char *envp[])
cupsArrayAdd(gs_args, strdup("-c"));
/* Set margins if we have a bounding box defined */
- if (h.cupsImagingBBox[3] > 0.0) {
+ if (h.cupsImagingBBox[3] > 0.0 && outformat != OUTPUT_FORMAT_PDF) {
snprintf(tmpstr, sizeof(tmpstr),
"<</.HWMargins[%f %f %f %f] /Margins[0 0]>>setpagedevice",
h.cupsImagingBBox[0], h.cupsImagingBBox[1],