Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right alignment using ZPL code for text printed at 270 degre(Bottom up 1

Status
Not open for further replies.

brreddy

Programmer
Oct 19, 2004
2
US
Hi,

I am having trouble in aligning the printed text with right alignment when I print text at 270 degrees(Read from Bottom Up). All the lines of the text is aligned left but would like to get right alignment.
Here is the code
^XA^ID*.FNT^XZ
^XA^MSN^XZ
^XA^JVN^XZ
^XA^MCY^XZ
^XA^LH000,000^LL900^FWN^LRN^FS
^FO1,1^AA^FD ^FS
^FO60,40^A0N,20,50^CI0^FD51212^FS
^FO160,65^BY3,0.0,50^B7I,13,0,0,4,Y^FD51212^FS
^FO30,130^GB275,330,3^FS
^FO45,145^A0B,28,28^CI0^FDCONC: 1 mg/ml^FS
^FO75,145^A0B,28,32^CI0^FDAPI: 604524 #2,3^FS
^FO105,145^A0B,28,28^CI0^FDTEST1^FS
^FO135,145^A0B,28,28^CI0^FDVEHICLE TEST2^FS
^PQ1^MCN^XZ
The text gets printed like this at 270 (Read bottom up)
Conc: 1 mg/ml
API: 604524 #2,3
TEST1
VEHICLE TEST2


Thanks,
Reddy
 
Maybe this will help???
take alook at my FAQ on using Zebra Barone Lite to create your label

faq694-2608


DougP, MCP, A+
 
Brreddy

You should read DougP's FAQ. Printing the label layout to a text file and cutting that information into my program saved me a lot of time.
On the right just issue. I had to right just the data before sending it to the label layout. I'm pulling from a SQL data base so I tried
Code:
select ltrim(lab_sqty) from table
that did not work for me but it might work for you.

What I ended up doing was padding the data after I go it into the program. Here is the code that I used.
Code:
Lab_sQTY = Lab_sQTY.PadLeft(8, " ")

If there is a way to mark the field property as right justified I have not found it.

Good Luck
Tom
 
DougP,

I am able to print to the networked Zebra Printer without any problem. The problem I am having is with the alignment of the printed text when printed at 270 degrees (read bottom up).
The text gets printed like this at 270 (Read bottom up)
Conc: 1 mg/ml
API: 604524 #2,3
TEST1
VEHICLE TEST2

I would like this to be printed like this when printed at 270 degrees

Conc: 1 mg/ml
API: 604524 #2,3
TEST1
VEHICLE TEST2
 
Lets back up for a minute.
How are you generating the strings
In VB6 ? or something
^FO105,145^A0B,28,28^CI0^FDTEST1^FS
or say there are max 10 characters you can have
^FO105,145^A0B,28,28^CI0^FD[red]1234567890[/red]^FS
or this becomes
This a VB6 or VBA code
Code:
FieldForTest1 = Space(10-Len(YourData)) & YourData
^FO105,145^A0B,28,28^CI0^FD" & FieldForTest1 & "^FS

So not matter how many characters you have coming in it pads the correct amount of space on the right side.
as 'TLeaders' said.

I don't think there is any other way to do it other than manipulate the data before you insert into the ZPL code.




DougP, MCP, A+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top