Document Auto Print

Whenever a document is created or modified the auto-print service checks to see if an auto-print queue has been defined on the corresponding folder hierarchy; defining an auto-print target on a folder enables auto-print for that folder and all subordinate folders. Auto-printing is provided by the coils.blob.autoprint service which must be running on a server node for which the IPP server specified by the DefaultIPPServer server default is reachable. The auto-print feature also requires the Python module "pycups" to be installed on the host providing the coils.blob.autoprint.

Aside: The autoprint feature predates the general EDDP functionality; this explains the existance of a seperate server component specifically for autoprint. At some point autoprint will be rolled into the general EDDP architecture.

An auto-print queue is assigned to a folder by creating an object property of {http://www.opengroupware.us/autoprint}autoPrintQueue whose value is the name of an IPP print queue on the IPP server specified by the DefaultIPPServer server default. Only IPP printing is supported by auto-print due to IPP's ability to deal with various file-types.

The IPPPrintableMIMETypes server default controls what types of documents the server considers printable. This default is a list of MIME types that can be processed by the IPP server specified by the DefaultIPPServer default. A site may adjust this list based upon the capabilities of the available IPP service. If not specified the server assumes the following list of MIME types are supported:

  • application/pdf : Portable Document Format documents.
  • image/jpeg : JPEG images
  • image/png : PNG images

When a document is created or modified within a folder hierarchy that has an auto-print target defined via the {http://www.opengroupware.us/autoprint}autoPrintQueue object property it will be processed for potential queuing. If the MIME type of a document does not match any value in the IPPPrintableMIMETypes or it has been flagged as damaged via the {57c7fc84-3cea-417d-af54-b659eb87a046}damaged object property the queuing will be rejected and an alert may be generated. If the document is not flagged as damaged and the MIME type is supported for printing it will be queued to the specified queue with the fit-to-page flag set and a media-size of "Letter"

Aside: The ability to change the auto-print media size via a server default IPPAutoPrintMediaSize is an open issue.

The printing, or failure to print, of a document created in an auto-print enabled folder hierarchy will be recorded as a comment in the document's audit log.

Alerts For Unprintable Documents

If a document is created in a folder in a folder hierarchy to which is assigned an auto-print queue is assigned and the MIME type does not match any value in the IPPPrintableMIMETypes server default or the document is flagged as damaged via the {57c7fc84-3cea-417d-af54-b659eb87a046}damaged object property the auto-print service will check the folder and it's parents for an object property of {http://www.opengroupware.us/autoprint}unprintableAlertAddress. This property may contain an e-mail alias to which an unprintable-document alert message will be sent. If this property is not defined on the folder or any of its parent's no alert will be generated. As the property search ascends the folder hierarchy the first unprintableAlertAddress property encountered will be used and folder's higher in the hierarchy will not be check for this property.

The alert will be generated using the "/Templates/UnprintableDocumentInAutoPrintFolder.mako" Mako template from Project 7,000. Sites may modify this template to match their own requirements.

If no corresponding template has been created or the template is invalid an administrative notice will be generated citing the exception which occurred [the intended address will not be notified].

Variable Type Description
damaged string The value of the {57c7fc84-3cea-417d-af54-b659eb87a046}damaged object property for the corresponding document, it set. If this property does not exist on the document the value of this template variable will be “NO”.
document Document entity reference A reference to the document entity.
folder Folder entity reference A reference to the document's folder; this is the folder containing the document.
mimetype string The MIME-type of the document; the auto-print service uses the the get_mimetype method of the TypeManager to acquire a document type for the MIME type.
printqueue string The auto-print queue corresponding to the document's folder. This may have been inherited via the folder's hierarchy.

Table 1: Variables provided to the unprintable alert template.

Alerts For Auto Print Failure

If a eligible document is created in an auto-print enabled hierarchy but the queuing of the print job to the IP server fails the server will attempt to generate a notice to the e-mail address specified via the hierarchy's "{http://www.opengroupware.us/autoprint}printFailAlertAddress" object property; if such a property exists. If this property is not defined within the folder hierarchy no alert will be generated. As the property search ascends the folder hierarchy the first "printFailAlertAddress" property encountered will be used and folder's higher in the hierarchy will not be check for this property.

The alert will be generated using the "/Templates/PrintFailInAutoPrintFolder.mako" Mako template from Project 7,000. Sites may modify this template to match their own requirements. If no corresponding template has been created or the template is invalid an administrative notice will be generated citing the exception which occurred [the intended address will not be notified].

Variable Type Description
document Document entity reference A reference to the document entity.
folder Folder entity reference A reference to the document's folder; this is the folder containing the document.
mimetype string The MIME-type of the document; the auto-print service uses the the get_mimetype method of the TypeManager to acquire a document type for the MIME type.
traceback string A, potentially multi-line, string containing the trace-back of the exception which occurred when the server attempted to queue the document for printing.
printqueue string The auto-print queue corresponding to the document's folder. This may have been inherited via the folder's hierarchy.

Table 2: Variables provided to the print fail alert template.