rodyager / RWTS-PDFwriter

An OSX print to pdf-file printer driver
GNU General Public License v2.0
838 stars 79 forks source link

Windows app from Crossover can't print #41

Open gathyblue opened 1 year ago

gathyblue commented 1 year ago

Before Sonoma worked well, after update I can print from native osx apps. But only waiting in a printing row when I want to use it from windows app with crossover (which one has upgraded as well). Reinstalled, restarted, nothing helped... :(

pls, help me Thx, B

rodyager commented 1 year ago

At the moment, I don't have a great many ideas - since I haven't upgraded to Sonoma yet (waiting for a mission critical piece of software to become compatible) and I don't use Crossover. However, the first thing to establish is how your Windows app accomplishes printing in Crossover. The simplest test, if your app allows it, it to "print" a document to a normal printer, but choose the save as or open in Preview option. [I know that most of the use of pdfWriter is to avoid the need to do just this]. If you saved, open the pdf in Preview, select Show Info from the Tools menu, and on the General info tab, tell me what it says for PDF Producer. There is hope if you see the words "Quartz PDFContext". Otherwise, its likely that we've reached the end of the line for this use case.

rje3 commented 1 year ago

Rod, yes It does show "Quartz PDFContext". Good news RWTS PDFwriter lives on - I hope!

Windows app from Crossover cant print

FWIW I too can't print from Crossover. Codeweavers uses the printers installed on the Mac for Crossover to print on Windows programs.

gathyblue, you could try this (didn't work for me): https://www.codeweavers.com/support/forums/general/?t=27;mhl=287811;msg=287811#msg287811

rodyager commented 1 year ago

Ok. So the next step is to see whether the required folders actually exist on your machine after the Sonoma upgrade.

Can you, in terminal, type

ls -la /var/spool

You expect something like:

total 408 drwxr-xr-x 8 root wheel 256 8 Sep 18:29 . drwxr-xr-x 38 root wheel 1216 24 Sep 08:09 .. drwx--x--- 166 root _lp 5312 29 Sep 07:56 cups drwxr-x--- 2 root wheel 64 2 Sep 17:35 mqueue drwxr-xr-x@ 3 root wheel 96 29 Jul 16:15 pdfwriter drwxr-xr-x 16 root wheel 512 2 Sep 17:35 postfix drwxr-xr-x 2 _uucp wheel 64 2 Sep 17:35 uucp

If one of the items listed is pdfwriter, then type

ls -la /var/spool/pdfwriter

You expect something like:

total 0 drwxr-xr-x@ 3 root wheel 96 29 Jul 16:15 . drwxr-xr-x 8 root wheel 256 8 Sep 18:29 .. drwx------@ 20 yourusername staff 640 18 Sep 07:15 yourusername

Send me the output.

The easy fix is if one or both of the required folders is missing.

rje3 commented 1 year ago

Hi Rod,

Last login: Thu Sep 28 18:27:35 on ttys000 username@MacBook-Pro ~ % ls -la /var/spool total 0 drwxr-xr-x 7 root wheel 224 29 Sep 11:04 . drwxr-xr-x 34 root wheel 1088 27 Sep 08:02 .. drwx--x--- 9 root _lp 288 29 Sep 11:06 cups drwxr-x--- 2 root wheel 64 16 Sep 23:28 mqueue drwxr-xr-x 3 root wheel 96 29 Sep 11:04 pdfwriter drwxr-xr-x 16 root wheel 512 16 Sep 23:28 postfix drwxr-xr-x 2 _uucp wheel 64 16 Sep 23:28 uucp username@MacBook-Pro ~ % ls -la /var/spool/pdfwriter total 0 drwxr-xr-x 3 root wheel 96 29 Sep 11:04 . drwxr-xr-x 7 root wheel 224 29 Sep 11:04 .. drwx------@ 4 username staff 128 29 Sep 11:05 username username@MacBook-Pro ~ %

rje3 commented 1 year ago

PDFwriter goes through the motions, it doesn't report any errors, but the destination folder is empty.

empty spool

Vipriser has the same problem.

rodyager commented 1 year ago

Open /var/spool/pdfwriter/username/ and check that it is actually empty. (It's possible your print files are there and that the problem is with the alias which is supposed to point here.

Otherwise, try changing the permissions on /var/spool/pdfwriter/username/ to be more (ie very) permissive in case the spooler is trying to write as another user in Sonoma.

sudo chmod 777 /var/spool/pdfwriter/username

is the appropriate command to do this.

Rod

rje3 commented 1 year ago

The username folder is empty. I changed permissions, tried again, no luck, sorry.

Has Apple changed something in Sonoma with CUPS?

rodyager commented 1 year ago

I suspect so. We were always living on borrowed time as Apple had indicated that cups filters were deprecated a long time ago.

Rod Sent from my iPhone

On 29 Sep 2023, at 12:25 pm, rje3 @.***> wrote:



The username folder is empty. I changed permissions, tried again, no luck, sorry.

Has Apple changed something in Sonoma with CUPS?

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/41#issuecomment-1740227551, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADKNKZHCJWYWCRMAPKDX4YWQ3ANCNFSM6AAAAAA5K2X3ZQ. You are receiving this because you commented.Message ID: @.***>

gathyblue commented 1 year ago

Thx the advice, but nothing changed. :( permission changed, folder exist. Stuck in a printing row...

Screenshot 2023-09-29 at 10 04 09

It worked in crossover 23.0.1 before Sonoma

rje3 commented 1 year ago

I suspect so. We were always living on borrowed time as Apple had indicated that cups filters were deprecated a long time ago. Rod

It gets worse. Crossover uses CUPS for local printers too, so I can't even print to an inkjet on Sonoma in WINE.

rje3 commented 1 year ago

Thx the advice, but nothing changed. :( permission changed, folder exist. Stuck in a printing row...

Sorry to see that. As a workaround I've installed a PDF printer on an always on, shared network computer used for Time Machine.

I'm using Crossover 22.1.1, as version 23 and later throws printer errors using PDF printer.

rodyager commented 1 year ago

Sonoma probably still uses CUPS, but is possibly only targeting a subset of printing protocols.

This could be an ugly work around. On Ventura, at least, if you have a postscript printer installed but stopped, the printer spools a pdf to /var/spool/cups/ for use when the printer is resumed. It’s saved with a file name of the form d_xxxxx_001 (or something like that.

If you copy it to a convenient location and give it a pdf extension, you have the pdf you want.

No guarantees that it will work on Sonoma - but worth a try.

Rod

Sent from my iPhone

On 29 Sep 2023, at 6:54 pm, rje3 @.***> wrote:



I suspect so. We were always living on borrowed time as Apple had indicated that cups filters were deprecated a long time ago. Rod

It gets worse. Crossover uses CUPS for local printers too, so I can't even print to an inkjet on Sonoma in WINE.

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/41#issuecomment-1740542715, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADMCHMAUNFG7WZK55ZTX42EFLANCNFSM6AAAAAA5K2X3ZQ. You are receiving this because you commented.Message ID: @.***>

rje3 commented 1 year ago

Codeweavers uses the printers installed on the Mac for Crossover to print on Windows programs.

Sorry Rod, I was mistaken, Crossover/WINE can print to CUPS printers even when they're not installed on the Mac. Definitely a bug (feature?) in Sonoma as none of my printers work in Crossover.

I've lodged a support request with Codeweavers and waiting feedback.

rje3 commented 1 year ago

No guarantees that it will work on Sonoma - but worth a try. Rod

Thanks I had a look but no luck. Printing with CUPS in Crossover under Sonoma creates no new files in that folder.

PDFwriter outputs a 1kb file (zipped sample attached) that can't be read by Preview after appending the .pdf extension.

c00006.zip

rodyager commented 1 year ago

Hi.

The output you sent me is the CUPS control file for the print job. It contains information about the data that the application sent to the printing system.

The relevant information is

document-fomat-supplied: application/octet-stream document-format-detected: application/postscript document-format: application/postscript

That means that crossover told the OS that it was sending the data as an octet-stream.

CUPS looked at the data it received and detected that the octet-stream was actually postscript.

And that’s the problem. CUPS no longer knows how to deal with postscript. Consequently, you will be unable to print from Crossover unless the physical printer attached to your mac has told the OS that it understands postscript or you are printing on a shared printer hosted on another machine that accepts postscript files.

In particular, PDFwriter (which CUPS thinks is a physical printer attached to your machine) cannot print because it only understands PDF.

Rod

On 3 Oct 2023, at 9:59 am, rje3 @.***> wrote:

No guarantees that it will work on Sonoma - but worth a try. Rod

Thanks I had a look but no luck. Printing with CUPS in Crossover under Sonoma creates no new files in that folder.

PDFwriter outputs a 1kb file (zipped sample attached) that can't be read by Preview after appending the .pdf extension.

c00006.ziphttps://github.com/rodyager/RWTS-PDFwriter/files/12787038/c00006.zip

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/41#issuecomment-1743886937, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADI2OCR5BC2NAZGCDSTX5NBNFAVCNFSM6AAAAAA5K2X3ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTHA4DMOJTG4. You are receiving this because you commented.Message ID: @.***>

rje3 commented 1 year ago

Rod, I'm beginning to lose hope! As I mentioned in another Issue:

macOS has removed the functionality for converting PostScript and EPS files to PDF format.

And from a Macrumor's forum post:

Sonoma has removed the pstopdf command, as well as the PSNormalizer framework which provides the PostScript interpreter for the OS.

My remote print server idea isn't panning out.

Thanks for you're ongoing support.

rodyager commented 1 year ago

At least in the short-term.

But it is likely that the Crossover team will fix this. They are invested in making Windows apps work on macOS. Currently, there printing for macOS implementation provides print data in postscript format. That will not work for anyone in Sonoma.

They are likely to add a postscript to pdf conversion tool to Crossover so that it supplies print data in PDF format. If they do that, everything will work again.

Rod

On 3 Oct 2023, at 11:16 am, rje3 @.***> wrote:

Rod, I'm beginning to lose hope! As I mentioned in another Issuehttps://github.com/rodyager/RWTS-PDFwriter/issues/42#issuecomment-1741647100:

macOS has removed the functionality for converting PostScript and EPS files to PDF format.

And from a Macrumor's forum posthttps://forums.macrumors.com/threads/postscript-is-dead.2402474/:

Sonoma has removed the pstopdf command, as well as the PSNormalizer framework which provides the PostScript interpreter for the OS.

My remote print server idea is panning out.

— Reply to this email directly, view it on GitHubhttps://github.com/rodyager/RWTS-PDFwriter/issues/41#issuecomment-1743960855, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAKSADJ6PWFCKY7TKUD3IHTX5NKPHAVCNFSM6AAAAAA5K2X3ZSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBTHE3DAOBVGU. You are receiving this because you commented.Message ID: @.***>

gathyblue commented 1 year ago

The latest Crossover finally solved it for me! Thx guys :)