WebSphere brand IBM WebSphere Premises Server, Version 6.1.x

Creating a custom print profile driver

Printer vendors can use the print profile API to develop customized message-driven beans (MDBs) to meet their printing requirements.

Procedure
  1. Turn off the default print driver.
    1. Log in to the WebSphere® Application Server administrative console.
    2. Navigate to Resources > JMS > Activation specifications and click LabelPrintJobCommandAS.
    3. Enter ibmse=off in Message selector field.
    4. Restart WebSphere Application Server.
  2. Develop a new MDB that listens for the outbound print profile topic.
  3. Develop a new class by extending the LabelPrintProfile abstract class.
  4. Use the call print, reprint or cancel print methods, as needed.
  5. Create a new topic with the correct topic name using the WebSphere Application Server administrative console.
  6. Create new activation specifications using the WebSphere Application Server administrative console.

Sample print profile code

public class DefaultPrintProfileDriver extends LabelPrintProfile{

public void labelprintjob(String print_job_id, Map metadata, String XML) {
	transform(String xml, String xslUrl)
}	
	public void labelprintjob_cancel(String print_job_id) {
		transform(String xml, String xslUrl) 		
	}
	
	public void labelprintjob_reprint(String print_job_id, Map metadata, String XML) {	
		transform(String xml, String xslUrl) 			
	}

Library | Support | Terms of use

(c) Copyright IBM Corporation 2004, 2008. All rights reserved.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.