Results 1 to 2 of 2
Thread: Passing escape codes to printers
- 03-05-2009, 11:27 PM #1
Member
- Join Date
- Mar 2009
- Location
- Alabama
- Posts
- 4
- Rep Power
- 0
Passing escape codes to printers
Hello All,
Has anyone worked with sending printer escape codes to line printers (i.e. Epson DFX-8500). We use these printers to generate our shipping documents, etc. and we'd like to add barcodes to our Bill of Lading documents. I set perform the printer file setup in the following code example:
/* Printer File Setup */
SpooledFileOutputStream out;
PrintParameterList printParms = new PrintParameterList();
printParms.setParameter(PrintObject.ATTR_OUTPUT_QU EUE, outputQueue);
printParms.setParameter(PrintObject.ATTR_FORMTYPE, "BOL");
printParms.setParameter(PrintObject.ATTR_PRTQUALIT Y, "*DRAFT");
printParms.setParameter(PrintObject.ATTR_CPI, charactersPerInch);
printParms.setParameter(PrintObject.ATTR_LPI, linesPerInch);
out = new SpooledFileOutputStream(system, printParms, null, null);
scsWtr = new SCS3812Writer(out, 37, system);
And use the following method to print:
private void println(String str) throws IOException {
scsWtr.write(str);
scsWtr.newLine();
lineCount++;
}
And we construct a StringBuffer to pass into the prinln method above:
sb = new StringBuffer(getSpaces(CPL));
sb.insert(0, centerBetween(0, 80,"Bill of Lading" + reprint));
sb.setLength(CPL);
println(sb.toString());
What I'd would like to be able to do is to send an escape code to our DFX-8500 to set the printer to print barcode (I have the DFX manual and documentation to on the escape codes) but I'm having problems with the printer actually recognizing any escape code correctly. Any suggestions? Or is their any solutions that deal with generating and printing barcodes that don't deal with the awt or swing classes?
Thanks,
Randy
- 03-08-2009, 12:16 AM #2
Similar Threads
-
Escape Sequence
By Punter in forum New To JavaReplies: 4Last Post: 02-10-2009, 07:04 AM -
Escape Sequence \t does not display.
By dreamingofgreen in forum New To JavaReplies: 7Last Post: 07-22-2008, 04:50 AM -
Scanners / Printers
By cytech in forum New To JavaReplies: 0Last Post: 03-17-2008, 05:54 PM -
Escape sequence problem
By eva in forum New To JavaReplies: 2Last Post: 01-21-2008, 10:15 PM -
Frog Escape 0.0.1 alpha
By JavaBean in forum Java SoftwareReplies: 0Last Post: 07-14-2007, 08:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks