public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libcupsfilters] f45: fix printing of PDF which lack Root object
@ 2026-08-19  6:44 Zdenek Dohnal
  0 siblings, 0 replies; only message in thread
From: Zdenek Dohnal @ 2026-08-19  6:44 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libcupsfilters
Branch : f45
Commit : a9246ac44fb429e89f9727e968331213a50776fb
Author : Zdenek Dohnal <zdohnal@redhat.com>
Date   : 2026-08-19T08:34:08+02:00
Stats  : +35/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libcupsfilters/c/a9246ac44fb429e89f9727e968331213a50776fb?branch=f45

Log:
fix printing of PDF which lack Root object

---
diff --git a/0001-Fix-printing-error-pdfio-output-Missing-Root-object..patch b/0001-Fix-printing-error-pdfio-output-Missing-Root-object..patch
new file mode 100644
index 0000000..9c19df5
--- /dev/null
+++ b/0001-Fix-printing-error-pdfio-output-Missing-Root-object..patch
@@ -0,0 +1,29 @@
+From e14bad406189a66bdeb40131112944bfb58ee0cc Mon Sep 17 00:00:00 2001
+From: szlt5 <117269245+szlt5@users.noreply.github.com>
+Date: Tue, 18 Aug 2026 16:04:19 +0800
+Subject: [PATCH] Fix printing error:  pdfio output "Missing Root object."
+ (#167)
+
+---
+ cupsfilters/pdf.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/cupsfilters/pdf.c b/cupsfilters/pdf.c
+index 1f714b20..3e438609 100644
+--- a/cupsfilters/pdf.c
++++ b/cupsfilters/pdf.c
+@@ -165,6 +165,11 @@ cfPDFPagesFP(FILE *file) 	// I - File pointer of PDF
+     fwrite(buffer, 1, bytes_read, temp_fp);
+   }
+ 
++  // call fflush(temp_fp) to flush the stdio buffer;
++  // otherwise pdfioFileOpen() may not see the complete contents of temp_filename because
++  // some data may still be buffered and not yet written to the file.
++  fflush(temp_fp);
++
+   // Open the temp file with pdfio
+   pdfio_file_t *pdf = pdfioFileOpen(temp_filename, NULL, NULL, NULL, NULL);
+ 
+-- 
+2.55.0
+

diff --git a/libcupsfilters.spec b/libcupsfilters.spec
index 5d9f93f..35b6a05 100644
--- a/libcupsfilters.spec
+++ b/libcupsfilters.spec
@@ -7,7 +7,7 @@
 Name: libcupsfilters
 Epoch: 1
 Version: 2.2.1
-Release: 1%{?dist}
+Release: 2%{?dist}
 Summary: Library for developing printing filters
 # the CUPS exception text is the same as LLVM exception, so using that name with
 # agreement from legal team
@@ -19,6 +19,8 @@ Source0: %{URL}/releases/download/%{version}/%{name}-%{version}.tar.gz
 # https://github.com/OpenPrinting/libcupsfilters/pull/208
 Patch001: 0001-pclmtoraster.c-Fix-getting-MediaBox-from-input.patch
 Patch002: 0001-pclmtoraster.c-Fix-processing-image-in-PCLm.patch
+# https://github.com/OpenPrinting/libcupsfilters/pull/167/commits/a9acdb22cc898076bf6c5d9d20474274ed123458
+Patch003: 0001-Fix-printing-error-pdfio-output-Missing-Root-object..patch
 
 
 # for generating configure and Makefile scripts in autogen.h
@@ -204,6 +206,9 @@ rm -f %{buildroot}%{_pkgdocdir}/{LICENSE,COPYING,NOTICE}
 
 
 %changelog
+* Wed Aug 19 2026 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.1-2
+- fix printing of PDF which lack Root object
+
 * Tue Aug 11 2026 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.2.1-1
 - fix pclmtoraster issues found in CI, 2.2.1 (fedora#2513920)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-19  6:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-19  6:44 [rpms/libcupsfilters] f45: fix printing of PDF which lack Root object Zdenek Dohnal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox