Documentation
¶
Overview ¶
Command print-server is a sample (docs/examples/print-server): a business application that prints invoices through a print server it embeds (package print/server, the server of bdf printd). It fills an invoice template (an Excel workbook with tags, package form) with what is typed on its page, puts the .bdf in the spool's queue, and shows the jobs as the spool sends them and the printer prints them (the server's /api/v1/events).
The spool keeps the jobs in one file, sends them to the printer, and retries a printer that is not reached; a job is printed once even when the program is stopped while it is being sent. Without a printer at hand, -fake-printer prints on bdf's fake IPP printer, in the same process.
cd examples/print-server && go run . -fake-printer open http://127.0.0.1:8083/ go run . -printer ipps://printer.example.local/ipp/print