There are two commonly-used ways for producing paper printouts:
Create PDF via PDF/FOP processing and make it available in the user's browser. This is what the example in the section The First PDF Document does.
Directly print FOP to a server side printer. This is what this section is about.
Server side printing is done via the interface
IPDFFOPService
:
public interface IPDFFOPService { public String generateXSLFO(); public byte[] generatePDF(); public void print(String printerName) throws FOPPrintException; public byte[] generatePDFfromFOXML(); public ILog getLog(); public Protocol getProtocol(); public String getTranslationFileName(); }
By using the method print(...)
, you can send a
document directly to a printer.