new file mode 100644
@@ -0,0 +1,27 @@
+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)
+
+Upstream-Status: Backport [https://github.com/OpenPrinting/libcupsfilters/commit/e14bad406189a66bdeb40131112944bfb58ee0cc]
+---
+ cupsfilters/pdf.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/cupsfilters/pdf.c b/cupsfilters/pdf.c
+index 1f714b203..3e4386091 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);
+
@@ -7,6 +7,7 @@ DEPENDS = "cups fontconfig libexif dbus lcms pdfio libpng jpeg tiff"
SRC_URI = "https://github.com/OpenPrinting/${BPN}/releases/download/${PV}/${BP}.tar.xz \
file://0001-Makefile.am-Only-generate-test_text_lorem.txt-for-ma.patch \
+ file://0002-Fix-printing-error-pdfio-output-Missing-Root-object.patch \
"
SRC_URI[sha256sum] = "0a22b849d5068c4c86b20fbb4192d3faa3dabcc9ee844c8fd73710ed821d4860"
cfPDFPagesFP() copies the input into a temporary file and opens it with PDFio without flushing the stdio buffer first, so small documents look empty and the count fails. cfFilterGhostscript then stops every PDF job with "Unexpected page count". Backport the upstream fix. Tested by printing a PDF through CUPS to an IPP Everywhere printer. AI-Generated: Uses Claude Code (Claude Opus 5.5) Signed-off-by: Markus Volk <f_l_k@t-online.de> --- ...ror-pdfio-output-Missing-Root-object.patch | 27 +++++++++++++++++++ .../cups/libcupsfilters_2.2.1.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta-oe/recipes-printing/cups/libcupsfilters/0002-Fix-printing-error-pdfio-output-Missing-Root-object.patch