Package Details: kyocera_universal 10.1.20240521-1

Git Clone URL: https://aur.archlinux.org/kyocera_universal.git (read-only, click to copy)
Package Base: kyocera_universal
Description: Kyocera Printing Package for many Kyocera printers (stripped of kdialog10).
Upstream URL: https://www.kyocera.com/
Keywords: kyocera printer utax
Licenses: Other
Conflicts: kyocera-cups
Provides: kyocera-cups
Submitter: Schmetzler
Maintainer: HartmutS
Last Packager: HartmutS
Votes: 9
Popularity: 0.26
First Submitted: 2017-11-06 11:13 (UTC)
Last Updated: 2026-08-30 11:54 (UTC)

Latest Comments

1 2 3 4 5 Next › Last »

cocouf commented on 2026-10-09 12:36 (UTC) (edited on 2026-10-09 12:38 (UTC) by cocouf)

kyofilter_pre_H imports PyPDF3 with the pre-3.0 class/method names (PdfFileReader/PdfFileWriter, getPage, mergePage, addPage, getNumPages). PyPDF3 no longer exists; the current pypdf package (already a declared dependency) renamed the module and API in v3.

Without this, every PDF job fails with:

ModuleNotFoundError: No module named 'PyPDF3' and CUPS reports 'pdftopdf filter function failed.'

Patch applied in prepare():

  • from PyPDF3 import ... -> from pypdf import PdfWriter/PdfReader
  • getNumPages() -> len(pdf.pages)
  • pdf.getPage(i) -> pdf.pages[i]
  • page.mergePage(wm) -> page.merge_page(wm)
  • writer.addPage(page) -> writer.add_page(page)

Kept the PdfFileReader/PdfFileWriter names via import aliases so the rest of the 500-line script needs no changes. Verified with python3 3.14 + pypdf 6.19 (py_compile + import surface check).

Based on AUR commit 321dcb4 (9.4.20240521-2). The newer AUR PKGBUILD (10.1) points at the same 20240521 source tarball, whose script is equally unpatched upstream, so the fix remains needed there too.

---
 PKGBUILD | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/PKGBUILD b/PKGBUILD
index bba82e0..7dd1a5d 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@

 pkgname=kyocera_universal
 pkgver=9.4.20240521
-pkgrel=2
+pkgrel=3

 major=$(cut -d '.' -f 1 <<< $pkgver)
 minor=$(cut -d '.' -f 2 <<< $pkgver)
@@ -42,6 +42,33 @@ prepare() {
   tar xzf ${toDwnld} -C .
   ar xv Debian/${Region}/kyodialog_${_arch}/kyodialog_${major}.${minor}-0_${_arch}.deb
   tar xzf data.tar.gz -C .
+
+  # kyofilter_pre_H still uses the ancient PyPDF3 API, which no longer
+  # exists (renamed to pypdf, classes/methods renamed in pypdf >= 3).
+  # Without this patch every PDF job fails with "pdftopdf filter function
+  # failed." (ModuleNotFoundError: No module named 'PyPDF3').
+  # Rewrites the imports and API calls to the modern pypdf equivalents.
+  python3 - <<'EOF'
+import sys
+
+path = "usr/lib/cups/filter/kyofilter_pre_H"
+src = open(path, encoding="utf-8").read()
+repl = [
+    ("from PyPDF3 import PdfFileWriter, PdfFileReader",
+     "from pypdf import PdfWriter as PdfFileWriter\nfrom pypdf import PdfReader as PdfFileReader"),
+    ("base_pdf.getNumPages()", "len(base_pdf.pages)"),
+    ("watermark_pdf.getPage(0)", "watermark_pdf.pages[0]"),
+    ("base_pdf.getPage(p)", "base_pdf.pages[p]"),
+    ("page.mergePage(watermark)", "page.merge_page(watermark)"),
+    ("new_pdf.addPage(page)", "new_pdf.add_page(page)"),
+]
+for old, new in repl:
+    if old not in src:
+        sys.exit(f"pypdf patch failed, pattern not found: {old}")
+    src = src.replace(old, new, 1)
+open(path, "w", encoding="utf-8").write(src)
+print("kyofilter_pre_H: patched to modern pypdf API")
+EOF
 }

 package() {

Best regards

bigjuck commented on 2026-09-06 09:56 (UTC) (edited on 2026-09-07 09:08 (UTC) by bigjuck)

Finally I did it with git clone and makepkg -srci successfully

@HartmutS selbstverständlich erwarte ich nicht, daß Sie sich mit paru auseinandersetzen. Als kleines archlinux Licht überlege ich mir genau bevor ich auf der Ebene was poste, wollte einfach beschreiben wie ichs versucht habe verstehen tu ichs immer noch nicht was da bei der paru-Installation nicht funtioniert, werd dumm weiterleben müßen. Danke trotzdem und einen angenehemn Sonntag

HartmutS commented on 2026-09-04 16:10 (UTC)

@bigjuck I am unfamiliar with paru and I think it is outside the scope of AUR helpers to try different hashes for the download. The problem seems the way the download-script on Kyoceras support page is naming the file. Having the same hash (as the one reported by bastla and the one I seen from the downloads) for two differently named files means just the name is different, the content is the same.

bigjuck commented on 2026-08-30 17:54 (UTC)

Thank you, I tried to update the driver with paru, how can I try other hashes with paru, or is it to update "manually" with github or so

HartmutS commented on 2026-08-30 11:58 (UTC)

Please test. There are some odd things happening on the download site. See below.

@bigjuck seems there are overlapping version numbers with different hashes

@bastla there seems no 20260709 timestamp for 10.1 for downloads from here. If I take your hash and use the old timestamp the download is valid. Strange things on their side.

bigjuck commented on 2026-08-26 14:00 (UTC)

Good afternoon, Kernel 6.18.44-1-lts Fehler nach paru -S kyocera-universal: ==> FEHLER: Eine oder mehrere Dateien überstanden nicht die Gültigkeits-Prüfung! Fehler: Quellen für ‚kyocera_universal-10.0.20240521-1‘ konnten nicht heruntergeladen werden: Fehler: Pakete konnten nicht erstellt werden: kyocera_universal-10.0.20240521-1

Any ideas , thank you very much

bastla commented on 2026-08-14 13:07 (UTC)

The printer driver has been updated again. Now minor release 10.1 and changed hash. Here are the necessary changes to PKBUILD:

diff --git a/PKGBUILD b/PKGBUILD
index f9416f6..dc6e4a3 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@
 #

 pkgname=kyocera_universal
-pkgver=10.0.20240521
+pkgver=10.1.20260709
 pkgrel=1

 major=$(cut -d '.' -f 1 <<< $pkgver)
@@ -29,7 +29,7 @@ toDwnld="KyoceraLinuxPackages_${date}_tar_gz.download.gz"
 source=("https://www.kyoceradocumentsolutions.us/content/dam/download-center-americas-cf/us/drivers/drivers/${toDwnld}")
 install=kyodialog-bin.install

-sha256sums=('20f7c978db123007a3a6c6688698b49061ab69cdd7ec065b6728bd77d9a900e7')
+sha256sums=('14235a8e4dbe9f2fdff481252e2cc64431f59a7dcf2497ef54852fb30211568f')

 if [ "$arch" == "x86_64" ]; then
   _arch="amd64"

HartmutS commented on 2026-06-01 18:35 (UTC)

@cbf305 any chance there was an old binary referenced from within CUPS? The new package (10.x) only has the *_H variants and works here.

cbf305 commented on 2026-05-28 13:07 (UTC) (edited on 2026-05-28 13:08 (UTC) by cbf305)

I couldn't print to any of our copiers at work today. I found that CUPS was barking about /usr/lib/cups/filters/kyofilter_pre_H and kyofilter_H missing. In that folder, I found those two files but in _X variants.

So I symlinked:

kyofilter_pre_X --> kyofilter_pre_H and kyofilter_X --> kyofilter_H

Once I restarted CUPS, I was able to print again. I don't print too often, so I am not sure when this changed/broke.

HartmutS commented on 2026-04-21 15:38 (UTC)

Thanks @dasarne - our printserver seems to have currently some issue. Please test carefully and provide feedback if something doesn't work with this update.