{{tag>Index Action Action_List Process Documents}} ====== PRINT DOCUMENT ====== This action is very similar to the DISPLAY DOCUMENT action, but instead of displaying the document on the screen, it sends the document to the printer of the server. The action has two variations: ''PRINT DOCUMENT'' AttributeIdentifier() [ ''TO'' ArithmeticExpression()] [ ''COPIES'' ] The action written in this format prints the contents of the attribute of the specified business object, provided that this attribute is of the Document type. Whatever document is stored in the attribute will be printed – no document processing is performed. For example, PRINT DOCUMENT Statement.StatementDocument The ''TO'' keyword indicates the name of the network server where the document will be sent for printing. If it is omitted the document will be sent to the default printer. If number of copies is specified the specified number of documents will be printed, otherwise one copy will be printed. Files corresponding to known document types only will be printed. Example: PRINT DOCUMENT StaffReport 5 COPIES PRINT DOCUMENT StaffReport TO 'Network Printer 1' 5 COPIES * ''PRINT DOCUMENT'' (Id() | StringLiteral()) [ ''TO'' ArithmeticExpression()] [ ''COPIES'' ] where Id() or StringLiteral() is the name of the document template to be printed. Before the document template is printed the action will calculate and fill in attribute values used inside tags in the template (see also the “[[:docs:2000_concepts:0900_prod_feats:0200_working_with_docs_reports:0200_doc_gen|Document Generation]]” section. Consider the following rules: FIND Person WHERE Person.Name='John Smith' PRINT DOCUMENT AccountOpeningLetter where ''AccountOpeningLetter'' is the name of the document template. If this template has the following line Dear <>, it will be replaced with the line Dear John Smith when the template is printed.