macOS deployment & integration
Deploy the Web Print Expert client on macOS 11+ (Apple Silicon / Intel) and integrate web-print-pdf for silent web printing and HTML to PDF. APIs match Windows and Linux for a single front-end codebase.
Three client editions
| Edition | Platform | Print backend | Installer |
|---|---|---|---|
| Windows | Windows 10/11 | Built-in silent print engine | .exe |
| Linux | x64 / arm64 | System print service | .deb / .rpm |
| macOS | macOS 11+ | CUPS | .dmg |
Windows, Linux, and macOS ship as separate installers but share the same WebSocket API (/websocket/standard)—front-end web-print-pdf code stays platform-agnostic.
End-user dmg install
- Download the macOS dmg from the download page.
- Open the dmg and drag Web Print Expert into Applications.
- Launch the client, complete setup, and verify the local print service.
npm install web-print-pdf—same APIs as on Windows / Linux.
| Item | Description |
|---|---|
| Install | Open dmg, drag to Applications |
| Architecture | Apple Silicon (M-series) and Intel supported |
| macOS version | macOS 11 Big Sur or later |
| Launch | Launch from Launchpad or Applications folder |
First launch & Gatekeeper
macOS may block the app as from an unidentified developer. Try:
- Right-click the app in Finder → Open, then confirm.
- Or go to System Settings → Privacy & Security and click Open Anyway.
- Enterprises can allowlist via MDM to avoid per-machine steps.
Front-end integration (same API as Win/Linux)
Browser pages on macOS use the same npm package and calls as Windows and Linux:
npm install web-print-pdf
Minimal runnable example (client must be running):
import webPrintPdf from 'web-print-pdf';
// 1. Ensure local WS service is up
const status = await webPrintPdf.utils.getConnectStatus();
if (!status.success) {
throw new Error('Start the Web Print Expert client first');
}
// 2. List installed printers (CUPS names on macOS)
const printers = await webPrintPdf.utils.getPrinterList();
const list = printers.data ?? printers;
console.log(list);
// 3. Silent-print HTML
await webPrintPdf.printHtml(
'<h1>Outbound order</h1><p>No.: SO-20260624</p>',
{ paperFormat: 'A4', margin: { top: '10mm', bottom: '10mm' } },
{ printerName: (list[0] && list[0].name) || 'Default printer', copies: 1 }
);
Local service: ws://127.0.0.1:{port}/websocket/standard—port shown in the client UI. web-print-pdf connects automatically; no hard-coded port needed.
macOS print stack
Same pipeline as Windows / Linux; only the output stage differs:
- Browser calls
printHtml→ npm submits via local WebSocket - Client Chromium engine renders HTML → PDF
- Job sent via CUPS to printers added in System Settings → Printers & Scanners
If a printer is missing, add it in macOS system settings first, then refresh the list in the client.
Troubleshooting
| Symptom | Suggested fix |
|---|---|
| npm connection failed | Ensure the client is running; check firewall rules for localhost |
| Missing CJK glyphs in PDF | Set common CJK fonts in HTML or install fonts on the Mac |
| Print does nothing | Print a test page in system settings; verify printerName matches the CUPS queue name |
| Mixed office environment | Share one web-print-pdf codebase; install the matching client per OS |
Deployment notes
- One front-end codebase across macOS, Windows, and Linux—ideal when design teams use Mac and production runs on Win/Linux.
- Works offline on intranet; PDF generation is local.
- Use the built-in Run examples page in the client to debug APIs and printer lists on Mac.
- macOS clients support updates with the same policy as Windows / Linux.