PDFWriter does not work anymore
After upgrading to Sequioa (maybe in previous upgrade), printing to the PDFWriter from any application will create an empty file in the corresponding output folder (normally PdfWriter).
MacBook Pro 14″, macOS 15.3
After upgrading to Sequioa (maybe in previous upgrade), printing to the PDFWriter from any application will create an empty file in the corresponding output folder (normally PdfWriter).
MacBook Pro 14″, macOS 15.3
Since I still need this driver to work, I've managed to enable something that would suffice.
1 - Enable file device in CUPS URI
CUPS doesn't allow the file protocol by default. Enable it by editing '/etc/cups/cups-file.conf':
FileDevice Yes
2 - Create a file backend
Check available backends:
% lpinfo -v
If the line 'file file' is missing, create the backend:
% sudo nano /usr/libexec/cups/backend/file
Write:
#!/bin/zsh
echo "file file \"PDFDriver\" \"Print to pdf file\""
Make it executable:
% chmod ugo+x /usr/libexec/cups/backend/file
Verify with:
% 'lpinfo -v'
If the 'file' backend is not included, check that the '/usr/libexec/cups/backend/file' runs from the terminal and produces the expected output. Verify that the step 1 is properly completed. Restart CUPS service or the computer.
3 - Add a new printer
Enable the web interface:
% cupsctl WebInterface=Yes
Go to: 'localhost:631/admin', log in:
4 - Prepare the output folder
% mkdir ${HOME}/PdfDriver
% chmod ugo+w ${HOME}/PdfDriver
5 - Install Postscript to PDF converter
Install Ghostscript (includes ps2pdf converter):
% brew install ghostscript
6 - Create a shell script for Conversion
Create '${HOME}/pdf-driver.sh':
#!/bin/zsh
# Folder to monitor
WATCH_DIR="$HOME/PdfDriver"
# File to process
TARGET_FILE="$WATCH_DIR/file.ps"
# Output file name
OUTPUT_FILE="$WATCH_DIR/output-$(date +%Y%m%d%H%M%S).pdf"
# Check if the target file exists
if [ -f "$TARGET_FILE" ]; then
# Convert the file using ps2pdf (requires sudo)
sudo /opt/homebrew/bin/ps2pdf "$TARGET_FILE" "$OUTPUT_FILE"
# Delete the original .ps file
sudo rm "$TARGET_FILE"
echo "Processed and deleted: $TARGET_FILE"
else
echo "Target file not found: $TARGET_FILE"
fi
Make it executable:
% chmod ugo+x ${HOME}/pdf-driver.sh
Note that the script points to '/opt/homebrew/bin/ps2pdf' as the conversion program to be used, change it according to the command of your preference.
Grant execution without password by editing the '/etc/sudoers' file with 'sudo visudo':
your_user_name ALL = (ALL) NOPASSWD: /Users/your_user_name/pdf-driver.sh
7 - Create an Automator folder action to trigger the shell script.
sudo /Users/federico/0-bashscripts/pdf-driver.sh
How it works
Notes
Hope this helps!
Since I still need this driver to work, I've managed to enable something that would suffice.
1 - Enable file device in CUPS URI
CUPS doesn't allow the file protocol by default. Enable it by editing '/etc/cups/cups-file.conf':
FileDevice Yes
2 - Create a file backend
Check available backends:
% lpinfo -v
If the line 'file file' is missing, create the backend:
% sudo nano /usr/libexec/cups/backend/file
Write:
#!/bin/zsh
echo "file file \"PDFDriver\" \"Print to pdf file\""
Make it executable:
% chmod ugo+x /usr/libexec/cups/backend/file
Verify with:
% 'lpinfo -v'
If the 'file' backend is not included, check that the '/usr/libexec/cups/backend/file' runs from the terminal and produces the expected output. Verify that the step 1 is properly completed. Restart CUPS service or the computer.
3 - Add a new printer
Enable the web interface:
% cupsctl WebInterface=Yes
Go to: 'localhost:631/admin', log in:
4 - Prepare the output folder
% mkdir ${HOME}/PdfDriver
% chmod ugo+w ${HOME}/PdfDriver
5 - Install Postscript to PDF converter
Install Ghostscript (includes ps2pdf converter):
% brew install ghostscript
6 - Create a shell script for Conversion
Create '${HOME}/pdf-driver.sh':
#!/bin/zsh
# Folder to monitor
WATCH_DIR="$HOME/PdfDriver"
# File to process
TARGET_FILE="$WATCH_DIR/file.ps"
# Output file name
OUTPUT_FILE="$WATCH_DIR/output-$(date +%Y%m%d%H%M%S).pdf"
# Check if the target file exists
if [ -f "$TARGET_FILE" ]; then
# Convert the file using ps2pdf (requires sudo)
sudo /opt/homebrew/bin/ps2pdf "$TARGET_FILE" "$OUTPUT_FILE"
# Delete the original .ps file
sudo rm "$TARGET_FILE"
echo "Processed and deleted: $TARGET_FILE"
else
echo "Target file not found: $TARGET_FILE"
fi
Make it executable:
% chmod ugo+x ${HOME}/pdf-driver.sh
Note that the script points to '/opt/homebrew/bin/ps2pdf' as the conversion program to be used, change it according to the command of your preference.
Grant execution without password by editing the '/etc/sudoers' file with 'sudo visudo':
your_user_name ALL = (ALL) NOPASSWD: /Users/your_user_name/pdf-driver.sh
7 - Create an Automator folder action to trigger the shell script.
sudo /Users/federico/0-bashscripts/pdf-driver.sh
How it works
Notes
Hope this helps!
There is no PDFWriter utility included in macOS 15.3. If this is a third-party product, contact that vendor for its compatibility with Sequoia v15.3 and an updated product if one is available.
Apple does offer a File menu > Print… PDF > Save as PDF capability in its applications. Is that working?
Thanks VikingOSX, as you stated, PDFWriter is a third party product. It relies on the cups ability to register custom backend.
This application seems to no longer being maintained.
I am trying to enable a PDF driver so that applications not having the Apple interface can generate a PDF.
Anyway I've found a work around, that I'll post in a reply to this question.
This one still works.
https://github.com/rodyager/RWTS-PDFwriter?tab=readme-ov-file
Good luck with that cups approach…
I quit installing Ghostscript with homebrew owing to the very deep dependency tree:
brew deps --tree --installed ghostscript
and instead, install the pre-built package from here. Even on Apple Silicon Macs, that installs all of the ghostscript tools in /usr/local/bin.
Thanks VikingOSX, good to know about Ghostscript installation option.
So far, this approach is meeting my needs.
PDFWriter does not work anymore