Problems with printing to cups-pdf, Ubuntu

Questions about Wine on Linux
Locked
zsdian
Newbie
Newbie
Posts: 2
Joined: Wed Nov 23, 2022 8:26 am

Problems with printing to cups-pdf, Ubuntu

Post by zsdian »

Hi All

I have an old Windows 98 app that we have been running under Wine on Ubuntu for years. We regularly used cup-pdf to generate printouts. Since upgrading to Ubuntu 20.04 it crashes every time we open a printer dialog. I had issues when we upgraded to 18.04 and I think I fixed it by installing libcups2:i386. I suspect the problem is related to 32bit software.

I have noted these errors getting logged.

0024:fixme:font:freetype_set_outline_text_metrics failed to read full_nameW for font L"Ani"!
0024:err:winspool:DocumentPropertiesW Could not load config module for L"PDF"

I also have an issue with "buttons" where the text lables are missing and you cannot press them with a mouse.

I have tried:
- Installing winehq-stable from dl.winehq.org
- Create a new .wine directory with a new WINEPREFIX and re-installing the probgram
- Create a new .wine directory with a new WINEPREFIX and WINEARCH=win32 and re-installing the probgram
- Installing libcups2_2.3.1-9ubuntu1.2_i386.deb and printer-driver-cups-pdf_3.0.1-5_i386.deb (note these are downgraded versions from the latest releases but are the most recent i386 versions I could find.

None of that worked. Does anybody have suggestions what to try next?

Thanks

Ian
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Problems with printing to cups-pdf, Ubuntu

Post by jkfloris »

I hear varying stories about cups-pdf. Fortunately, there are alternatives.
You can create a PDF printer with ippeveprinter from the cups-ipp-utils package.

Code: Select all

ippeveprinter -d $HOME/Documents/ -k -f application/pdf "PDF Printer"
# -d = the output directory
# -k = Keep the documents
# -f application/pdf = Save as PDF file
# "PDF Printer" = The name of the printer
Installing libcups2_2.3.1-9ubuntu1.2_i386.deb and printer-driver-cups-pdf_3.0.1-5_i386.deb (note these are downgraded versions from the latest releases but are the most recent i386 versions I could find.
According to Ubuntu, this is the version that exists in Focal. Using packages from other PPAs can cause problems with Wine.
I also have an issue with "buttons" where the text lables are missing and you cannot press them with a mouse.
This is probably another problem. Which program is affected by this?
EmillyEl
Newbie
Newbie
Posts: 1
Joined: Mon Nov 21, 2022 11:41 am

Re: Problems with printing to cups-pdf, Ubuntu

Post by EmillyEl »

jkfloris wrote: Thu Nov 24, 2022 12:06 pm I hear varying stories about cups-pdf. Fortunately, there are alternatives.
You can create a PDF printer with ippeveprinter from the cups-ipp-utils package.

Code: Select all

ippeveprinter -d $HOME/Documents/ -k -f application/pdf "PDF Printer"
# -d = the output directory
# -k = Keep the documents
# -f application/pdf = Save as PDF file
# "PDF Printer" = The name of the printer
Installing libcups2_2.3.1-9ubuntu1.2_i386.deb and printer-driver-cups-pdf_3.0.1-5_i386.deb (note these are downgraded versions from the latest releases but are the most recent i386 versions I could find.
According to Ubuntu, this is the version that exists in Focal. Using packages from other PPAs can cause problems with Wine.
I also have an issue with "buttons" where the text lables are missing and you cannot press them with a mouse.
This is probably another problem. Which program is affected by this?
Thanks for sharing the alternatives, they were helpful to me!
zsdian
Newbie
Newbie
Posts: 2
Joined: Wed Nov 23, 2022 8:26 am

Re: Problems with printing to cups-pdf, Ubuntu

Post by zsdian »

Thanks for the feedback. My latest attempts (which do not work) have libcups2:i386 from focal and printer-driver-cups-pdf:amd64 from focal. The 32 bit printer-driver-cups-pdf was one minor version lower. The program is "Paradox 98".

My current plan is to setup a VM running 32 bit linux, in a protected environment, with wine and only that one app. Once it is debugged and running, we will not touch it again. It has run happily for years and hopefully will be completely replaced sooner rather than later. If necessary I will install an older, archived version of debian or ubuntu - Ubuntu 18.04 + wine worked fine.

(I could run a Windows VM, but that would be even more painful! The app is much faster and more stable under wine than it ever was under Windows. My next challenge is to get 32bit Linux running under 64bit Xen. I have just discovered that domO linux kernels since version 5, no longer support 32 bit domU guests in "pv" mode, looks like I have to use hvm mode.)

I will report back here once I have the problem sorted.
Locked