IMPRIMIR ETIQUETAS ELGIN L42 PPLB

 Tópico anterior Próximo tópico Novo tópico

IMPRIMIR ETIQUETAS ELGIN L42 PPLB

VB.NET

 Compartilhe  Compartilhe  Compartilhe
#488559 - 25/04/2019 23:03:07

JOHNSTEVE
COSMOPOLIS-SP
Cadast. em:Janeiro/2016


 Anexos estao visíveis somente para usuários registrados

Boa noite galera, tudo firmeza com vocs?
alguem aqui do grupo trabalha em suas aplicaes algum modelo de impresso nessa impressora da ELGIN ?

gostaria de saber com vocs o procedimento de enviar impresso para ela...

estou precisando de implantar no meu software no cadastro do produto conforme a imagem abaixo.
Descrio, preo de venda e cdigo do produto.






#488561 - 26/04/2019 08:05:59

JONESPARIS
ERECHIM
Cadast. em:Fevereiro/2006


Última edição em 26/04/2019 08:12:42 por JONESPARIS

Ol
A impresso nestas etiquetas, exige que voc envie comandos diretamente para ela.
Neste link voc encontra o Manual da Elgin.
https://www.elgin.com.br/PortalElginAdm/Upload/DownloadPublico/Automacao/L42/Desenvolvimento/BPLB%20manual%20de%20programacao%20-%20rev%20%203%200.pdf

E Este um exemplo de como funciona no cdigo Fonte:
Open portadaimpressora For Output As #1
                
                
                    Print #1, Chr$(2) & []L[] & vbCr
                    Print #1, Chr$(2) & []H10[]
                    Print #1, Chr$(2) & []D11[]
                    Print #1, Chr$(2) & []1A5203000200050[] & []900000000003361[] []Cdigo
                    Print #1, Chr$(2) & []131100000800050[] & []PREO R$ : []
                    Print #1, Chr$(2) & []131100001000050[] & []373,00[]
                    Print #1, Chr$(2) & []131100001200050[] & []Descrio[]
                    Print #1, Chr$(2) & []Q0001[]
                    Print #1, []E[]
                  
Close #1



Jones Paris

#488562 - 26/04/2019 08:15:44

JOHNSTEVE
COSMOPOLIS-SP
Cadast. em:Janeiro/2016


Citação:
:
Ol
A impresso nestas etiquetas, exige que voc envie comandos diretamente para ela.
Neste link voc encontra o Manual da Elgin.
https://www.elgin.com.br/PortalElginAdm/Upload/DownloadPublico/Automacao/L42/Desenvolvimento/BPLB%20manual%20de%20programacao%20-%20rev%20%203%200.pdf

E Este um exemplo de como funciona no cdigo Fonte:
Open frmConfiguraes.Textx(137).Text For Output As #1
                
                
                    Print #1, Chr$(2) & []L[] & vbCr
                    Print #1, Chr$(2) & []H10[]
                    Print #1, Chr$(2) & []D11[]
                    Print #1, Chr$(2) & []1A5203000200050[] & []900000000003361[] []Cdigo
                    Print #1, Chr$(2) & []131100000800050[] & []PREO R$ : []
                    Print #1, Chr$(2) & []131100001000050[] & []373,00[]
                    Print #1, Chr$(2) & []131100001200050[] & []Descrio[]
                    Print #1, Chr$(2) & []Q0001[]
                    Print #1, []E[]
                  
                Close #1


Bom dia JONESPARIS , esse comando enviado atravs de arquivo txt alguma pasta da impressora?
ou teria que enviar direto para a impressora, tipo um PrintDocument ?






Resposta escolhida #488565 - 26/04/2019 08:54:22

ANGELOATA
ARACATUBA
Cadast. em:Junho/2009


Última edição em 26/04/2019 08:55:42 por ANGELOATA

Cara baixa o programa da Elgin pra desenhar a etiqueta... ai vc manda atraves de rowprinter...

[url=http://] https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=2ahUKEwi5r_nY2O3hAhVnFLkGHb8CBNoQFjADegQIBBAB&url=https%3A%2F%2Fwww.bztech.com.br%2Fdownloads%2Fsoftware-bylabel-elgin-l42&usg=AOvVaw1GyKAWV7-AgWmpLZTe_78D  [/url]

essa chamada do rowprinter, vc pode usar com qualquer marca... zebra, Argox, Brother, elgin... o que muda so o formato da etiqueta... e EPL / ZPL...


para chamar so usar a chamada SendToPrinter


  

Imports System.Runtime.InteropServices

Public Class RawPrinter

    Public Structure DOCINFO
        <MarshalAs(UnmanagedType.LPWStr)> Public DocumentName As String
        <MarshalAs(UnmanagedType.LPWStr)> Public OutputFile As String
        <MarshalAs(UnmanagedType.LPWStr)> Public DataType As String
    End Structure

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function OpenPrinter(ByVal pPrinterName As String, ByRef phPrinter As IntPtr, ByVal pDefault As Integer) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function StartDocPrinter(ByVal hPrinter As IntPtr, ByVal Level As Integer, ByRef pDocInfo As DOCINFO) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function StartPagePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Ansi, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function WritePrinter(ByVal hPrinter As IntPtr, ByVal data As String, ByVal buf As Integer, ByRef pcWritten As Integer) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function EndPagePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function EndDocPrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function ClosePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    Public Shared Sub SendToPrinter(ByVal printerJobName As String, ByVal rawStringToSendToThePrinter As String, ByVal printerNameAsDescribedByPrintManager As String)
        Dim handleForTheOpenPrinter = New IntPtr()
        Dim documentInformation = New DOCINFO()
        Dim printerBytesWritten = 0
        documentInformation.DocumentName = printerJobName
        documentInformation.DataType = vbNullString
        documentInformation.OutputFile = vbNullString
        OpenPrinter(printerNameAsDescribedByPrintManager, handleForTheOpenPrinter, 0)
        StartDocPrinter(handleForTheOpenPrinter, 1, documentInformation)
        StartPagePrinter(handleForTheOpenPrinter)
        WritePrinter(handleForTheOpenPrinter, rawStringToSendToThePrinter, rawStringToSendToThePrinter.Length, printerBytesWritten)
        EndPagePrinter(handleForTheOpenPrinter)
        EndDocPrinter(handleForTheOpenPrinter)
        ClosePrinter(handleForTheOpenPrinter)
    End Sub

End Class






#488566 - 26/04/2019 09:07:41

JONESPARIS
ERECHIM
Cadast. em:Fevereiro/2006


Citação:
Bom dia JONESPARIS , esse comando enviado atravs de arquivo txt alguma pasta da impressora?
ou teria que enviar direto para a impressora, tipo um PrintDocument ?


Diretamente para Impressora Jhon, na porta. Tipo um PrintDocument

Jones Paris

#488642 - 30/04/2019 10:14:49

MFLAVIO
CAMPINAS
Cadast. em:Maio/2009


Citação:
:
Cara baixa o programa da Elgin pra desenhar a etiqueta... ai vc manda atraves de rowprinter...

[url=http://] https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=2ahUKEwi5r_nY2O3hAhVnFLkGHb8CBNoQFjADegQIBBAB&url=https%3A%2F%2Fwww.bztech.com.br%2Fdownloads%2Fsoftware-bylabel-elgin-l42&usg=AOvVaw1GyKAWV7-AgWmpLZTe_78D  [/url]

essa chamada do rowprinter, vc pode usar com qualquer marca... zebra, Argox, Brother, elgin... o que muda so o formato da etiqueta... e EPL / ZPL...


para chamar so usar a chamada SendToPrinter


  

Imports System.Runtime.InteropServices

Public Class RawPrinter

    Public Structure DOCINFO
        <MarshalAs(UnmanagedType.LPWStr)> Public DocumentName As String
        <MarshalAs(UnmanagedType.LPWStr)> Public OutputFile As String
        <MarshalAs(UnmanagedType.LPWStr)> Public DataType As String
    End Structure

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function OpenPrinter(ByVal pPrinterName As String, ByRef phPrinter As IntPtr, ByVal pDefault As Integer) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function StartDocPrinter(ByVal hPrinter As IntPtr, ByVal Level As Integer, ByRef pDocInfo As DOCINFO) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function StartPagePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Ansi, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function WritePrinter(ByVal hPrinter As IntPtr, ByVal data As String, ByVal buf As Integer, ByRef pcWritten As Integer) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function EndPagePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function EndDocPrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function ClosePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    Public Shared Sub SendToPrinter(ByVal printerJobName As String, ByVal rawStringToSendToThePrinter As String, ByVal printerNameAsDescribedByPrintManager As String)
        Dim handleForTheOpenPrinter = New IntPtr()
        Dim documentInformation = New DOCINFO()
        Dim printerBytesWritten = 0
        documentInformation.DocumentName = printerJobName
        documentInformation.DataType = vbNullString
        documentInformation.OutputFile = vbNullString
        OpenPrinter(printerNameAsDescribedByPrintManager, handleForTheOpenPrinter, 0)
        StartDocPrinter(handleForTheOpenPrinter, 1, documentInformation)
        StartPagePrinter(handleForTheOpenPrinter)
        WritePrinter(handleForTheOpenPrinter, rawStringToSendToThePrinter, rawStringToSendToThePrinter.Length, printerBytesWritten)
        EndPagePrinter(handleForTheOpenPrinter)
        EndDocPrinter(handleForTheOpenPrinter)
        ClosePrinter(handleForTheOpenPrinter)
    End Sub

End Class




e como que utiliza o SendToPrinter?
eu tenho o arquivo da etiqueta mais precisa fazer alteraes nos campos(nome do Produto,Codigo de barras, valor ETC)


Deus e o maior dos Programadores, ele criou tudo em liguagem visual
                                           .... e viu Deus que era bom


#488699 - 04/05/2019 19:19:59

JOHNSTEVE
COSMOPOLIS-SP
Cadast. em:Janeiro/2016


Citação:
:
:
Cara baixa o programa da Elgin pra desenhar a etiqueta... ai vc manda atraves de rowprinter...

[url=http://] https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=4&cad=rja&uact=8&ved=2ahUKEwi5r_nY2O3hAhVnFLkGHb8CBNoQFjADegQIBBAB&url=https%3A%2F%2Fwww.bztech.com.br%2Fdownloads%2Fsoftware-bylabel-elgin-l42&usg=AOvVaw1GyKAWV7-AgWmpLZTe_78D  [/url]

essa chamada do rowprinter, vc pode usar com qualquer marca... zebra, Argox, Brother, elgin... o que muda so o formato da etiqueta... e EPL / ZPL...


para chamar so usar a chamada SendToPrinter


  

Imports System.Runtime.InteropServices

Public Class RawPrinter

    Public Structure DOCINFO
        <MarshalAs(UnmanagedType.LPWStr)> Public DocumentName As String
        <MarshalAs(UnmanagedType.LPWStr)> Public OutputFile As String
        <MarshalAs(UnmanagedType.LPWStr)> Public DataType As String
    End Structure

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function OpenPrinter(ByVal pPrinterName As String, ByRef phPrinter As IntPtr, ByVal pDefault As Integer) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=False, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function StartDocPrinter(ByVal hPrinter As IntPtr, ByVal Level As Integer, ByRef pDocInfo As DOCINFO) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function StartPagePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Ansi, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function WritePrinter(ByVal hPrinter As IntPtr, ByVal data As String, ByVal buf As Integer, ByRef pcWritten As Integer) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function EndPagePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function EndDocPrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    <DllImport([]winspool.drv[], CharSet:=CharSet.Unicode, ExactSpelling:=True, CallingConvention:=CallingConvention.StdCall)> _
    Private Shared Function ClosePrinter(ByVal hPrinter As IntPtr) As Long
    End Function

    Public Shared Sub SendToPrinter(ByVal printerJobName As String, ByVal rawStringToSendToThePrinter As String, ByVal printerNameAsDescribedByPrintManager As String)
        Dim handleForTheOpenPrinter = New IntPtr()
        Dim documentInformation = New DOCINFO()
        Dim printerBytesWritten = 0
        documentInformation.DocumentName = printerJobName
        documentInformation.DataType = vbNullString
        documentInformation.OutputFile = vbNullString
        OpenPrinter(printerNameAsDescribedByPrintManager, handleForTheOpenPrinter, 0)
        StartDocPrinter(handleForTheOpenPrinter, 1, documentInformation)
        StartPagePrinter(handleForTheOpenPrinter)
        WritePrinter(handleForTheOpenPrinter, rawStringToSendToThePrinter, rawStringToSendToThePrinter.Length, printerBytesWritten)
        EndPagePrinter(handleForTheOpenPrinter)
        EndDocPrinter(handleForTheOpenPrinter)
        ClosePrinter(handleForTheOpenPrinter)
    End Sub

End Class




e como que utiliza o SendToPrinter?
eu tenho o arquivo da etiqueta mais precisa fazer alteraes nos campos(nome do Produto,Codigo de barras, valor ETC)


boa noite brother, vc conseguiu imprimir ?
eu estou com a impressora do Cliente, porem envia o comando certinho mais nao imprime nada, sai a etiqueta em branco.  fiz os comandos certinhos conforme o amigo ensinou no Sentprint



 Tópico anterior Próximo tópico Novo tópico


Tópico encerrado, respostas não sao permitidas
Encerrado por JOHNSTEVE em 06/05/2019 11:18:37