A macOS virtual printer that converts any document to PDF with smart save options.
- Print to PDF from any application
- Automatic or manual save location selection
- Smart file naming with conflict resolution
- Easy installation and uninstallation
- Clean, modern SwiftUI interface
- System-wide CUPS integration
- macOS 12.0 or later
- Xcode 14.0+ (for building)
- Command Line Tools (
xcode-select --install) - CUPS development headers (
brew install cups)
-
Clone the repository:
git clone https://github.com/otto/OttosPrintToPDF.git cd OttosPrintToPDF -
Clone the reference implementation:
git clone https://github.com/alexivkin/CUPS-PDF-to-PDF.git reference
-
Run the build script:
./build.sh
- After building, drag
build/Otto's Print to PDF.appto your Applications folder - Launch the application
- Click "Install Virtual Printer" when prompted
- You may need to enter your administrator password
- The app will install the necessary CUPS backend and configuration
- Launch "Otto's Print to PDF" from your Applications folder
- The app will show the current installation status
- Toggle automatic PDF saving if desired:
- When enabled: PDFs save to the original document's location
- When disabled: You'll be prompted for a save location
- From any application, choose File > Print
- Select "OttosPDF" from the printer list
- Click Print
- Based on your settings:
- Auto-save enabled: PDF saves automatically
- Auto-save disabled: Choose where to save the PDF
- Open the application
- Click "Uninstall Printer"
- Confirm the uninstallation
- The app will clean up all associated files and configurations
The application integrates with macOS's CUPS printing system to provide system-wide PDF printing capabilities:
- Registers a virtual printer using CUPS
- Intercepts print jobs and converts them to PDF
- Handles file saving through a native macOS interface
- Manages printer installation and configuration
- Provides a user-friendly interface for settings
The application requires certain permissions:
- System Events access for printer management
- File system access for saving PDFs
- Administrator access for CUPS configuration
All permissions are requested only when needed and are managed through the macOS security system.
-
Printer not appearing:
- Ensure the app is running
- Try reinstalling through the app
- Check System Preferences > Printers & Scanners
-
PDF save issues:
- Verify permissions in System Preferences > Security & Privacy
- Ensure the app has access to save locations
- Check CUPS error log:
/var/log/cups/error_log
If you encounter issues:
- Check the Console.app for application logs
- Open an issue on GitHub with:
- macOS version
- Steps to reproduce
- Error messages or logs
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
MIT License - See LICENSE file for details
- Based on CUPS-PDF-to-PDF
- Built with SwiftUI and CUPS