rodyager / RWTS-PDFwriter

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

Page Options Not Available #46

Open andrewvaughan opened 9 months ago

andrewvaughan commented 9 months ago

For whatever reason, when I use this printer in an app that implements its own print screen, there are no paper sizes that are available and it prevents those apps from being able to print. My guess is there's some standard "supported paper sizes" configuration that the virtual printer doesn't have populated.

megamaniac commented 9 months ago

I have this same problem in Fusion360... I was assuming it was a deliberate prevention by the F360 app to stop the 'workaround' of printing out a drawing to pdf.

Edit: It doesn't loo like it's anything to do with default page sizes. I tried editing the pps file in /etc/cups/ppd by just pasting the settings from another printer I have - this does modify the paper sizes in most applications but not in F360 which still shows a blank box and does not allow 'printing' to PDFWriter.

andrewvaughan commented 9 months ago

That's helpful, and you may very well be right. It's been a while but I know Fusion360 previously didn't block PDF printers. It wouldn't surprise me if it now blocks any printer with "PDF" in the name.

I also tested another app with no pages and it printed fine, so that does not seem to be the root cause.

Maybe this can be a feature request to allow the user to change their printer name and metadata either at install or in the print utility.

henry63 commented 2 months ago

Same problem with fusion. Apparently a page format is required, otherwise the print operation achieves without any output.

rodyager commented 2 months ago

The default paper size for this driver is A4 (Set in the PPD). Andrew Vaughan's comment that it may be an application choice to block this driver for some reason (eg the PDF as part of its name) is more likely to be the reason.

henry63 commented 2 months ago

Thank you for your quick reply.

I should have added that Fusion has a drop down menu for paper size, and that for the pdf driver, nothing appears in it.

I also tried renaming the driver to something else (vprint) and it did not help.

henry63 commented 2 months ago

Dwelving more into macos, I was able to get the file ! That is very strange : the print job is generated and is in the printer queue Use sudo "ls -l /var/spool/cups" to see the file (named d (a number)-001) THen cp it (with sudo) somewhere else (user space preferably) Then do ps2pdf to get a PDF version. The page format is square !! This is a problem with ps2pdf I think. (I tried without success ps2pdf -sPAPERSIZE=a4 filename )

THe strange point is that the file is in the queue but does not appears on the printer interface at a higher level. You can also check the queue with the CUPS interface, by listing all jobs. THe file appears there.

rodyager commented 2 months ago

Ah Henry! Fusion constructs the print job in postscript, and so only works with a printer that contains a built in postscript interpreter. Apple removed its built in postscript to pdf converters in Sonoma due to the inherent security risks posed by postscript - a move that it could make because the OS does all its drawing work using pdf constructs, and so almost universally, applications were already producing their description of the print job using either pdf or in a raw bitmap format. PDFwriter actually does very little. It tells the OS that it only understands PDF and so the OS attempts to send the printjob to it in PDF format - which it can obviously do if it is already in that format, and the OS has a raw to pdf converter for raw formats. Before Sonoma, it also had a ps to pdf converter for the rare print job constructed in postscript, but now such conversions fail. The third party pstopdf converters are incompatible with the MacOS print architecture, so I can't use them, and the pre Sonoma apple converters depend on versions of libraries that are incompatibe with those shipped with Sonoma and beyond - I tried. Bottom line - Fusion will only work with a printer that understands Postscript.