Tuesday, 15 February 2011

The java printing code is working,send to printer but not print anything(java in python) -



The java printing code is working,send to printer but not print anything(java in python) -

i have made various research on this,plus,i'm using python,which implement java in python script.somehow,the record send printer(i got message this)but not print.can help me on this,i'm stuck on this.thanks.

this code,i got no error this.

import scheme import javax.print import java.io java.lang import thread filestream = java.io.bufferedinputstream(java.io.fileinputstream("c:/geeks.txt")) psinformat = javax.print.docflavor.input_stream.autosense mydoc = javax.print.simpledoc(filestream,psinformat,none) aset = javax.print.attribute.hashprintrequestattributeset() aset.add(javax.print.attribute.standard.copies(2)) services = javax.print.printservicelookup.lookupdefaultprintservice() job = services.createprintjob() job.print(mydoc, none) thread.sleep(20000) filestream.close()

you trying send .docx file printer; print service doesn't know how render , print .docx file. seek sending plain text file.

java python ios multithreading printing

No comments:

Post a Comment