matthall Posted May 2, 2012 Share Posted May 2, 2012 I need to print white text on a black background to a Zebra printer. Whilst these are configurable settings in iReports the zebra doesn't respond to them and will print an unfilled rectangle with black text in it if I try to do it this way.I am trying instead to send the Zebra print commands (I have used these successfully before in a StreamServe project) and whilst this now works [white text on black background] none of the other fields, static text, lines etc. that I have displayed on the report are printed!I am using zebra command within a variable:"^XA" +"^FO50,1250" +"^GB735,60,60,B,0^FS" +"^FO55,1255^CFG,40,35" +"^FR" +"^FD"+$F{INV_CONTACT_FAX}+"^FS" +"^XZ"Any advice on either the Zebra command or any alternatives I might attempt much appreciated. Link to comment Share on other sites More sharing options...
matthall Posted May 2, 2012 Author Share Posted May 2, 2012 Removed the XA and XZ commands and this now works - no idea what those were doing specifically but they were included in the Zebra documentation and not in my original StreamServe coding - doh!"^FO50,1250" +"^GB735,60,60,B,0^FS" +"^FO55,1255^CFG,40,35" +"^FR" +"^FD"+$F{INV_CONTACT_FAX}+"^FS" It is still a little peculiar, the code ought to set the size and location of both the black box and the text but;I seem to need to control the text location by field placement within iReports - it doesn't get placed by the Zebra code (whereas it does in StreamServe)I have two separate labels each with the black box in different places. To create the second I simply moved the variable location in the iReport, adjusted the black box position using the zebra code ("^FO50,1250" + ==>>> "^FO50,850" +) and yet the font size comes out smaller on the second. Weird. At any rate a satisfactory result achieved Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now