我熟悉一些标签格式,但是此任务有问题。在图像中,有一个表,当有位置(最多10个)时,应在中间区域填充该表,其中包含位置,尺寸说明,TOT至SER,说明和UN编号列。我需要对一些值进行硬编码,以便可以在ZPL查看器中看到它们并弄乱格式。我该如何对这些值进行硬编码,以使location_1的行至少带有表格边框?在此先感谢您的帮助!我知道代码很长,但我想我只需要在代码中间将location_1主体硬编码为任何内容。像LOCATIONXYZ
#parse("version.vm")
#if ($PrintMode == "Bartender" || $PrintMode == "MarkMagic")
^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR2,2~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
## crtncnts.vm - Carton Content Label (6x8 inches 203 dpi)
## in:
## /appli/manh/wms/profile-root/runtime/data/labels/ZE1
## /appli/manh/wms/distribution/data/labels/ZE1
## version:
^FX crtncnts.vm - 2017/09/07 - v4.1 ^FS
## change:
## 2017/08/29 - v3.1 - add comments and versionning
## 2017/09/06 - v3.2 - change of date format
## 2017/09/07 - v4.0 - suppression of "origin" column + set "UN Number" column to cust_sku_n
## 2017/09/07 - v4.1 - use of $vendor_item_nbr_n instead of $cust_sku_n in "UN Number" column
## Label size for 203 dpi (with 6+6 margin space)
^PW1224
^LL1632
## Framework (origin is 33x33)
^FO33,33^GB1167,1567,7^FS ^FX Global frame ^FS
^FO160,33^GB220,527,7^FS ^FX Bloc 4 (right) ^FS
^FO160,553^GB220,527,7^FS ^FX Bloc 3 (middle) ^FS
^FO160,1073^GB220,527,7^FS ^FX Bloc 2 (left) ^FS
^FO953,33^GB247,1567,7^FS ^FX Bloc 6 (footer) ^FS
## Blocs in read direction
## Bloc 1 (header)
^FT120,547^A0B,67,60^FB487,1,0,R^FD$!{carton_nbr}^FS
^FT120,1073^A0B,67,60^FB520,1,0,C^FDPicking List^FS
^FT107,1573^A0B,33,31^FC%,@,*^FD%m/%d/%Y %H:%M:%S^FS
## Bloc 2 (left)
^FT200,1573^A0B,33,31^FDCustomer:^FS
^FT247,1553^A0B,33,31^FD$!{d_facility_name}^FS
#set ($Max_NbChar=31) #if ($!{ship_to_name.length()} > $Max_NbChar) #set ($ship_to_name=$ship_to_name.substring(0,$Max_NbChar)) #end
^FT287,1553^A0B,33,31^FD$!{ship_to_name}^FS
## Bloc 3 (middle)
^FT200,1053^A0B,33,31^FDConstituting a Parcel: $!{carton_type}^FS
#set ($Max_NbChar=14) #if ($!{orders_ref_field3.length()} > $Max_NbChar) #set ($orders_ref_field3=$orders_ref_field3.substring(0,$Max_NbChar))
#end
^FT247,1053^A0B,33,31^FDType of Shipment: $!{orders_ref_field3}^FS
## Bloc 4 (right)
#set ($Max_NbChar=18) #if ($!{po_nbr.length()} > $Max_NbChar) #set ($po_nbr=$po_nbr.substring(0,$Max_NbChar)) #end
^FT200,540^A0B,33,31^FDOrder Number: $!{po_nbr}^FS
^FT247,540^A0B,33,31^FDDelivery Number: $!{distro_number}^FS
^FT333,520^BY3,3,73^BCB,,Y,N^FD>:$!{distro_number}^FS
## Bloc 5 (list): columns are ordered A to E in reading direction
## Bloc 5 (list): header framework (FWK)
#set($FWK_Offset_x=387)
#set($FWK_Offset_y_E=53)
#set($FWK_Offset_y_D=253)
#set($FWK_Offset_y_C=1013)
#set($FWK_Offset_y_B=1160)
#set($FWK_Offset_y_A=1373)
#set($FWK_Size_x=53)
#set($FWK_Size_y_E=203)
#set($FWK_Size_y_D=762)
#set($FWK_Size_y_C=149)
#set($FWK_Size_y_B=216)
#set($FWK_Size_y_A=209)
#set($FWK_Thickness=3)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
## Bloc 5 (list): header content (CNT)
#set($CNT_size_x=23)
#set($CNT_Size_y=21)
#set($CNT_Offset_y_E=240)
#set($CNT_Offset_y_D=999)
#set($CNT_Offset_y_C=1146)
#set($CNT_Offset_y_B=1360)
#set($CNT_Offset_y_A=1567)
#set($CNT_offset_x=420)
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FDUN_Number^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FDDescription^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FDTOT TO SER^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FDSize Description^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FDLocation^FS
## Max number of character for each column (ordered A to E in reading direction)
#set($Max_NbChar_E=16)
#set($Max_NbChar_D=64)
#set($Max_NbChar_C=11)
#set($Max_NbChar_B=17)
#set($Max_NbChar_A=17)
## Shift between each line (Step)
#set($Step=51)
## Bloc 5 (list): line 1
#if ($location_1)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_1.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_1=$vendor_item_nbr_1.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_1.length()} > $Max_NbChar_D) #set ($sku_desc_1=$sku_desc_1.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_1.length()} > $Max_NbChar_C) #set ($qty_1=$qty_1.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_1.length()} > $Max_NbChar_B) #set ($dsp_sku_1=$dsp_sku_1.substring(0,$Max_NbChar_B)) #end
#if ($!{location_1.length()} > $Max_NbChar_A) #set ($location_1=$location_1.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_1}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_1}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_1}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_1}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_1}^FS
#end
## Bloc 5 (list): line 2
#if ($location_2)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_2.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_2=$vendor_item_nbr_2.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_2.length()} > $Max_NbChar_D) #set ($sku_desc_2=$sku_desc_2.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_2.length()} > $Max_NbChar_C) #set ($qty_2=$qty_2.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_2.length()} > $Max_NbChar_B) #set ($dsp_sku_2=$dsp_sku_2.substring(0,$Max_NbChar_B)) #end
#if ($!{location_2.length()} > $Max_NbChar_A) #set ($location_2=$location_2.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_2}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_2}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_2}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_2}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_2}^FS
#end
## Bloc 5 (list): line 3
#if ($location_3)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_3.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_3=$vendor_item_nbr_3.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_3.length()} > $Max_NbChar_D) #set ($sku_desc_3=$sku_desc_3.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_3.length()} > $Max_NbChar_C) #set ($qty_3=$qty_3.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_3.length()} > $Max_NbChar_B) #set ($dsp_sku_3=$dsp_sku_3.substring(0,$Max_NbChar_B)) #end
#if ($!{location_3.length()} > $Max_NbChar_A) #set ($location_3=$location_3.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_3}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_3}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_3}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_3}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_3}^FS
#end
## Bloc 5 (list): line 4
#if ($location_4)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_4.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_4=$vendor_item_nbr_4.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_4.length()} > $Max_NbChar_D) #set ($sku_desc_4=$sku_desc_4.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_4.length()} > $Max_NbChar_C) #set ($qty_4=$qty_4.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_4.length()} > $Max_NbChar_B) #set ($dsp_sku_4=$dsp_sku_4.substring(0,$Max_NbChar_B)) #end
#if ($!{location_4.length()} > $Max_NbChar_A) #set ($location_4=$location_4.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_4}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_4}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_4}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_4}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_4}^FS
#end
## Bloc 5 (list): line 5
#if ($location_5)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_5.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_5=$vendor_item_nbr_5.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_5.length()} > $Max_NbChar_D) #set ($sku_desc_5=$sku_desc_5.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_5.length()} > $Max_NbChar_C) #set ($qty_5=$qty_5.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_5.length()} > $Max_NbChar_B) #set ($dsp_sku_5=$dsp_sku_5.substring(0,$Max_NbChar_B)) #end
#if ($!{location_5.length()} > $Max_NbChar_A) #set ($location_5=$location_5.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_5}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_5}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_5}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_5}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_5}^FS
#end
## Bloc 5 (list): line 6
#if ($location_6)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_6.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_6=$vendor_item_nbr_6.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_6.length()} > $Max_NbChar_D) #set ($sku_desc_6=$sku_desc_6.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_6.length()} > $Max_NbChar_C) #set ($qty_6=$qty_6.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_6.length()} > $Max_NbChar_B) #set ($dsp_sku_6=$dsp_sku_6.substring(0,$Max_NbChar_B)) #end
#if ($!{location_6.length()} > $Max_NbChar_A) #set ($location_6=$location_6.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_6}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_6}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_6}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_6}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_6}^FS
#end
## Bloc 5 (list): line 7
#if ($location_7)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_7.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_7=$vendor_item_nbr_7.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_7.length()} > $Max_NbChar_D) #set ($sku_desc_7=$sku_desc_7.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_7.length()} > $Max_NbChar_C) #set ($qty_7=$qty_7.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_7.length()} > $Max_NbChar_B) #set ($dsp_sku_7=$dsp_sku_7.substring(0,$Max_NbChar_B)) #end
#if ($!{location_7.length()} > $Max_NbChar_A) #set ($location_7=$location_7.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_7}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_7}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_7}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_7}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_7}^FS
#end
## Bloc 5 (list): line 8
#if ($location_8)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_8.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_8=$vendor_item_nbr_8.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_8.length()} > $Max_NbChar_D) #set ($sku_desc_8=$sku_desc_8.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_8.length()} > $Max_NbChar_C) #set ($qty_8=$qty_8.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_8.length()} > $Max_NbChar_B) #set ($dsp_sku_8=$dsp_sku_8.substring(0,$Max_NbChar_B)) #end
#if ($!{location_8.length()} > $Max_NbChar_A) #set ($location_8=$location_8.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_8}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_8}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_8}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_8}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_8}^FS
#end
## Bloc 5 (list): line 9
#if ($location_9)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_9.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_9=$vendor_item_nbr_9.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_9.length()} > $Max_NbChar_D) #set ($sku_desc_9=$sku_desc_9.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_9.length()} > $Max_NbChar_C) #set ($qty_9=$qty_9.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_9.length()} > $Max_NbChar_B) #set ($dsp_sku_9=$dsp_sku_9.substring(0,$Max_NbChar_B)) #end
#if ($!{location_9.length()} > $Max_NbChar_A) #set ($location_9=$location_9.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_9}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_9}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_9}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_9}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_9}^FS
#end
## Bloc 5 (list): line 10
#if ($location_10)
#set($FWK_Offset_x=$FWK_Offset_x+$Step)
^FO$FWK_Offset_x,$FWK_Offset_y_E ^GB$FWK_Size_x,$FWK_Size_y_E,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_D ^GB$FWK_Size_x,$FWK_Size_y_D,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_C ^GB$FWK_Size_x,$FWK_Size_y_C,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_B ^GB$FWK_Size_x,$FWK_Size_y_B,$FWK_Thickness ^FS
^FO$FWK_Offset_x,$FWK_Offset_y_A ^GB$FWK_Size_x,$FWK_Size_y_A,$FWK_Thickness ^FS
#set($CNT_offset_x=$CNT_offset_x+$Step)
#if ($!{vendor_item_nbr_10.length()} > $Max_NbChar_E) #set ($vendor_item_nbr_10=$vendor_item_nbr_10.substring(0,$Max_NbChar_E)) #end
#if ($!{sku_desc_10.length()} > $Max_NbChar_D) #set ($sku_desc_10=$sku_desc_10.substring(0,$Max_NbChar_D)) #end
#if ($!{qty_10.length()} > $Max_NbChar_C) #set ($qty_10=$qty_10.substring(0,$Max_NbChar_C)) #end
#if ($!{dsp_sku_10.length()} > $Max_NbChar_B) #set ($dsp_sku_10=$dsp_sku_10.substring(0,$Max_NbChar_B)) #end
#if ($!{location_10.length()} > $Max_NbChar_A) #set ($location_10=$location_10.substring(0,$Max_NbChar_A)) #end
^FT$CNT_offset_x,$CNT_Offset_y_E ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{vendor_item_nbr_10}^FS
^FT$CNT_offset_x,$CNT_Offset_y_D ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{sku_desc_10}^FS
^FT$CNT_offset_x,$CNT_Offset_y_C ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{qty_10}^FS
^FT$CNT_offset_x,$CNT_Offset_y_B ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{dsp_sku_10}^FS
^FT$CNT_offset_x,$CNT_Offset_y_A ^A0B,$CNT_size_x,$CNT_Size_y ^FD$!{location_10}^FS
#end
## Bloc 6 (footer)
^FT993,1573^A0B,33,31^FDParcel #:^FS
^FT993,1453^A0B,33,31^FD$!{carton_nbr}^FS
^FT1087,1453^BY4,3,87^BCB,,Y,N^FD>:$!{carton_nbr}^FS
^FT1087,540^A0B,33,31^FDTheoretical weight: $!{Est_Wt} KgG^FS
^FT1167,1573^A0B,33,31^FDYour parcel was thoughtfully prepared by:^FS
^PQ1,0,1,Y
^XZ
#end
#*
__START_FIELD_LIST_BARTENDER__
carton_nbr
carton_type
current_date
current_time
d_facility_name
distro_nbr
distro_number
dsp_sku_1
dsp_sku_2
dsp_sku_3
dsp_sku_4
dsp_sku_5
dsp_sku_6
dsp_sku_7
dsp_sku_8
dsp_sku_9
dsp_sku_10
location_1
location_2
location_3
location_4
location_5
location_6
location_7
location_8
location_9
location_10
orders_ref_field3
po_nbr
qty_1
qty_2
qty_3
qty_4
qty_5
qty_6
qty_7
qty_8
qty_9
qty_10
ship_to_name
sku_desc_1
sku_desc_2
sku_desc_3
sku_desc_4
sku_desc_5
sku_desc_6
sku_desc_7
sku_desc_8
sku_desc_9
sku_desc_10
vendor_item_nbr_1
vendor_item_nbr_2
vendor_item_nbr_3
vendor_item_nbr_4
vendor_item_nbr_5
vendor_item_nbr_6
vendor_item_nbr_7
vendor_item_nbr_8
vendor_item_nbr_9
vendor_item_nbr_10
__END_FIELD_LIST_BARTENDER__
*#
答案 0 :(得分:0)
只需获取您拥有的代码,用实际值替换所有变量,然后它就可以工作。混乱直到你得到你想要的。然后再次用变量替换所有硬编码值。
所有如果打印机读取的ZPL命令都以^ XYa,b,c开头,其中^是命令前缀,XY将是命令,而abc将是不同的变量。您可以在Zebra的ZPL指南中查找^ XY命令。诸如“ $ CNT_offset_x”之类的东西需要替换为数字。还有带有文字的“ $!{vendor_item_nbr_1}”。
如果您创建了一个“行”部分,并将其放入循环中,而不是将10个不同的行部分放在一起,那么您将获得巨大的帮助。然后在循环中,您可以将行高乘以行号,然后加上起始位置。将其用于所有垂直定位像素计数。比定位每个变量容易得多。然后,如果您需要更改某些内容,则可以更改一次,而不是10次。