在Zebra iMZ320上打印(Objective-C + ZebraSDK + ZPL)

时间:2015-05-27 15:16:49

标签: ios printing zebra-printers

我正在开发iOS应用程序(Ojective-C)+ Zebra iMZ320,我需要一些帮助!

我使用Zebra SDK方法-(void)sendZplOverBluetooth{}将可变数据发送到打印机。

我在http://labelary.com/viewer.html使用ZPL设计了我的标签。请在问题末尾找到标签代码。

我可以将我的标签分成3部分:

  • 固定文字 - 以代码显示

  • 图片 - 以代码显示

  • 变量文字 - 未在代码中显示并使用-(void)sendZplOverBluetooth{}发送

我的问题:

  • 如何处理我的标签部件?我应该将它们分成2个(固定和可变)或3个(固定文本,图片和可变文本)部分吗?

  • 如何保存打印机上的代码?

  • 如何将所有部件组合在一起以便打印"一个"标签

  • 使用sendZplOverBluetooth{}时,我发现了一些尺寸限制。如果我的数据大于支持的数据该怎么办?

提前致谢!

我的标签:

^XA
^PON
^MNN,N
^LL900
^FO0,0^GB576,180,4,B^FS
^FO210,10^GB0,160,2,B^FS
^FO15,20^GFA,3266,3266,23,,X07MFE,V01FFCK03FF8,V0FFO0FF8,U0FCQ03F,T0F8S03F,S07CI01E0F1EL03E,R03CI01FE1FDE003FI07C,Q01FJ01E01FCE003FFI0F,Q07803F01CE1FFE0078FI01E,P01C00FFC1FE1EFE0078F078078,P07800FBF1FC1E7E00IF0FE01E,O01EI0F0F1E01E3E00FFC0FF80F,O0380F07878E01E1E01FE03E7C01C,O0E07E0783CFFCE1E01E007F80C0F,N0380F803C3EFFE6I01E00FF83F81C,N0E007383F7C7M0C01EI07E0E,M01C003F80FF8P03EI0FF038,M03I03F04FCI01IFCI03FE01F381C,M0EI01F0FI01MF8007E07C1007,L01CJ0FFE007OFC00E0FJ018,L03K07F803IFJ01IFC001FJ01C,L0EK03F00FF8M03FF001EK06,L0CL0807FQ0FE01CK038,K018M03FR01F8M01C,K07N0F86Q063FN04,K0EM07E4T07EM03,J018L01F18S018FM038,J03M07EV0CFEL01C,J06L01F88U013FM06,J0EL03FW07EFCL07,J0CL078FW033EL03,I018L0F7EX0EFL018,I03L03CEY037CL0C,I07L07B8Y01DEL06,I0EK01F7g01E7L07,I08K03FEgG0FFCK03,0018K03BEgG0FDEK018,003L0FFEgG0FEFL0C,007K01FF2gG01FF8K0C,006K03DE2gH07FCK06,006K03BC2gH07DCK07,00CK07F8gI01EEK03,008K0F7gJ01FFK03,018J01DFgJ01FF8J018,03K01FEgK07DCK08,03K03BEgL01CK0C,07K07F8gK01FEK0C,06K0FF8gK0IF8J06,06K0FFgK01IFCJ06,04J01FFgK03IFEJ07,0CJ01DF8gJ0KF8I03,0CJ01FF8gI01KF8I03,08J03BgK01KFCI03,18J07CgH03E03JFC6I018,18J078gG0OF83I018,38J0F8N07Q0FC07LF038I08,3K0E8N07O03F8007KFE018I08,3K0E8N032K01IFEI07KFE008I0C,3K0F8O0FK07JFI03FCIFC00CI0C,3K0F8N03FK0KFC003F01FFC004I0C,3J01FCN01FJ01LF801E18CFE004I0C,7J01DF2M01FJ03NF8E7EE0F804I0C,7J01DF8M07F8I03MF862FEE01F06I04,7J01DFJ07IF0JFE3LFE1167EF0E3E3I04,7J01FF00LF877PFCFCF3DF8IFBI04,6J01FE1NF11PF8FE983F8FF8FI04,6J01LFC1MFC3LF8FE87FF8FF87I04,6J01LFC07KFE03LFCFD03FFCFF83I04,6J01LFC01KF801LFE7901FFCFF8J04,6J01LFC007IFE001MF8780FFC7F8J04,603B81LFC001IF8001OFC07FC3F80CC04,603F81LF8I07FFI01OFE03FE3F81FE04,71IF1LF8I03FEI01OFE01IF387FF84,71EFF1LFCI07FEI01OFE00JF877F84,70IF1LFC007C07E0019OF007IF87FF8C,307FC1LFC038I03801C7NF003IF83FF0C,307FE0LFC0CK0603C3NF001IF83FF0C,307FE0LFC38K0103C0IFE01FEI0IF03FF0C,307FC0LFE70F803F0C3C07FFC003EI07FF03FF0C,3K0MFC7070C0C2FC03FF8M07FEK08,38J0MF8C7110C21FC00FF8M03FEK08,18J07KFE087090E10FC007F804K03FEJ018,18J07KFC0800E00107C00FF806K07FCJ018,08J03KF80800E00103C01FF807K07FCJ038,08J03KF80800F00101E07FF003K07FCJ03,0CJ01KF00801900201E1IF801803FEFF8J03,0CJ01JFE00401180601E7IF801C0KF8J07,04K0JFC003040608003JF800F0KFK06,06K0JF8I0F803FI01JF800F0IFE3K06,07K07FFES07IFC007CIFC6K04,03K03IFCQ01FF1FC007E7FFCCK0C,03K03JF8J0EJ01E003CF001F9FF9CK08,018J01IFEK0FK0F007C7800FE3E18J018,008K0IFL06K0181F81C003FF03K038,00CK0E018J03F8J0303F80FI0FE06K03,006K0300EQ0C1FF8078003E0CK07,006K03003P0383FF801EI0E1CK06,007K01803CO0E07FF800FC00E18K0E,003J01IFCF8M03C3IFI07IFE3L0C,0018I03I03FF8K01E0IFEJ0JFEK018,I08I02J038FF8003E03IFEJ03FF1CK038,I0C0063IFC0C03IFE01JFCK0301I06007,I0601FI0F784031FE00KF8M0E001F806,I07078C00388C060460703IFM01C0039C0C,I03870C001D88180031C03FFCM0780038418,I0187K0F983I01F001FF8M0FI01FC38,J0E18J03E03J06I0FEM01CJ0F87,J0618J01E03J01I078M038J0206,J03M0703J01R0EM0C,J018L01C18I02Q038L018,K0CM0788I021FO0EM03,K06I0EI01F8I0EE0CM078I06I06,K03001DJ03CI0F004L03EJ03801C,K01C039CJ0F801C00CK01FK01C038,L0E0FF8J01F81I0CK0F8L0606,L0700FL07FJ0CJ03CM020C,L0380EM0FE001J03FO01C,M0C0CN07FC3003FEK01J038,M07Q01KF8L07EI0E,M01CI03CX0C6003C,N0EI076X0EF007,N03800F8X07F81C,N01E01CY03007,O0781CU03E00101E,O01E07I0EQ077J07,P0782I0F6P073I01E,P03CJ0FEL03C0073I03C,Q07I0196001C007C0073I0F,Q01E0018E001C0018003F0078,R07CI0C001E0018K03E,S0F800800720018J01F,T0F8J0620018I01F8,T01F8Q01F8,U03FCO03F8,V07FFM07FC,W07FFCI03FFC,Y0MF,gG07FE,,::^FS
^FO220,45^FB350,5,0,C,0^AAN,22,10^FH^FDEden Pet Respeito por voc_88, seu pet e o meio ambi_88nte. www.edenpet.com.br^FS
^CFA,20
^FO0,190^GB576,110,2,B^FS
^FO5,200^FH^FDN_a3mero do Atendimento...^FS
^FO5,225^FH^FDN_a3mero do Lacre.........^FS
^FO5,250^FH^FDN_a3mero do Contrato......^FS
^FO5,275^FH^FDN_a3mero do Certificado...^FS
^FO0,315^GB576,110,2,B^FS
^FO5,325^FDNome do Pet.............^FS
^FO5,350^FH^FDEsp_82cie do Pet..........^FS
^FO5,375^FH^FDRa_87a do Pet.............^FS
^FO5,400^FDPeso do Pet.............^FS
^FO0,440^GB576,160,2,B^FS
^FO5,450^FH^FDCrema_87_c6o Translado Tipo.^FS
^FO5,475^FH^FDCrema_87_c6o Urna Modelo....^FS
^FO5,500^FH^FDCrema_87_c6o Tipo...........^FS
^FO5,525^FH^FDCrema_87_c6o Modalidade.....^FS
^FO5,550^FH^FDCrema_87_c6o Servi_87o........^FS
^FO5,575^FH^FDCrema_87_c6o Local Coleta...^FS
^FO0,615^GB576,110,2,B^FS
^FO5,625^FH^FDCl_a1nica.............^FS
^FO5,650^FDMotorista...........^FS
^FO5,675^FH^FDPropriet_a0rio........^FS
^FO5,700^FH^FDRespons_a0vel Entrega.^FS
^FO0,740^GB576,160,2,B^FS
^FO5,750^FH^FDValor Crema_87_c6o..........^FS
^FO5,775^FH^FDValor Coleta............^FS
^FO5,800^FH^FDValor Urna..............^FS
^FO5,825^FH^FDValor Translado.........^FS
^FO5,850^FH^FDValor Servi_87o...........^FS
^FO5,875^FH^FDValor Total.............^FS
^FO0,920^GB576,700,2,B^FS
^FO5,930^FDFINANCEIRO^FS
^FO5,975^FDQuantidade de Pagamentos..^FS
^FO5,1010^FDParcela 1.................^FS
^FO5,1035^FDForma.....................^FS
^FO5,1060^FDValor.....................^FS
^FO5,1085^FDVencimento................^FS
^FO5,1135^FDParcela 2.................^FS
^FO5,1160^FDForma.....................^FS
^FO5,1185^FDValor.....................^FS
^FO5,1210^FDVencimento................^FS
^FO5,1260^FDParcela 3.................^FS
^FO5,1285^FDForma.....................^FS
^FO5,1310^FDValor.....................^FS
^FO5,1335^FDVencimento................^FS
^FO5,1385^FDParcela 4.................^FS
^FO5,1410^FDForma.....................^FS
^FO5,1435^FDValor.....................^FS
^FO5,1460^FDVencimento................^FS
^FO5,1500^FH^FDObserva_87_e4es...............^FS
^FO5,1650^FH^FB576,5,0,J,0^FDConfirmo minha responsabilidade pelo animal de estima_87_c6o e autorizo a realiza_87_c6o da crema_87_c6o deste animal conforme as condi_87_e4es discriminadas neste documento, ou conforme contrato da Cl_a1nica com o Eden Pet Cremat_a2rio Ltda.^FS
^FO330,1790^FD___________________^FS
^FO330,1810^FH^FDRespons_a0vel Entrega^FS
^XZ

2 个答案:

答案 0 :(得分:1)

要回答其中一个问题,您可以使用前两部分中的图像保存命令以及最后一部分中的图像加载来分三部分发送标签以拉入前两部分。这些命令是^ IS和^ IL。

您也可以在一次发送中合并所有这些内容。您可能遇到iOS问题,其中在BlueTooth频道上写入时出现问题。要通过此操作,必须增加send命令的延迟。在您的打印机连接类上,将TimeToWaitAfterWriteInMilliseconds设置为60或更高。

答案 1 :(得分:0)

根据标签的性质,您可以使用zebra-toolkit,这将为您节省ZPL的大量麻烦。