- Code: Select all Expand view
- Private Sub Impresion_Azteca()
Azteca = "" & OrFle & "" & Tipo & "" & codigo_Des & "" & Via & "" & DetDestino & "" & _
"" & ValorDeclarado & "" & GuiaFactura & "" & TipoEntrega & "" & Peso & "" & _
"" & Observaciones & "" & Cantidad & "" & RutDestinatario & "" & Nom_Destina & "" & _
"" & Telefono1 & "" & Telefono2 & "" & Direccion1 & "" & Direccion2 & "" & _
"000000000" & ComunaDestinatario1 & "" & NombreDestinatario2 & "" & _
"" & Valor_Cobro & "" & IdProducto & "" & ComunaDestinatario2 & "000000000"
AztecFontObj.Encode(Azteca, 0, 10, 0, "False", "False")
'************************************************************************
'************************************************************************
Azteca2 = "" & OrFle & "" & Tipo & "" & Ciudad2 & "" & Via & "" & DetDestino & "" & _
"" & ValorDeclarado & "" & GuiaFactura & "" & TipoEntrega & "" & Peso & "" & _
"" & Observaciones & "" & Cantidad & "" & RutDestinatario & "" & Nom_DestinaX & "" & _
"" & Telefono1 & "" & Telefono2 & "" & DireccionX & "" & Direccion2 & "" & _
"000000000" & ComunaDestinatario1 & "" & NombreDestinatario2 & "" & _
"" & Valor_Cobro & "" & IdProducto & "" & ComunaDestinatario2 & "000000000"
AztecFontObj2.Encode(Azteca2, 0, 10, 0, "False", "False")
'" & PuntoDestino & "
'AztecNet.ControlAccessibleObject.ReferenceEquals(Azteca, 0, 10, 0, "False", "False")
LLenarValores()
With PrintDocument1.PrinterSettings
' Especifico el nombre de la impresora
' por donde deseo imprimir.
'
'.PrinterName = "Lexmark T644 PS3"
'.PrinterName = "3"
.PrinterName = LoginForm1.Impresora
' Establezco el número de copias que se imprimirán
'.Copies = 2
' Rango de páginas que se imprimirán
'.PrintRange = PrintRange.AllPages
If .IsValid Then
PrintDocument1.Print()
Else
MessageBox.Show("La impresora " & LoginForm1.Impresora & " no esta instalada.")
Close()
End If
End With
'PrintDocument1.Print()
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim Imagen As System.Drawing.Image = PictureBox1.Image
Dim Imagen2 As System.Drawing.Image = PictureBox2.Image
Dim Imagen3 As System.Drawing.Image = PictureBox3.Image
Dim Imagen4 As System.Drawing.Image = PictureBox4.Image
Dim Salto As Integer = 13
Dim Salto1 As Integer = 13
Dim Z As Integer = 1
Dim RowCount As Integer
Dim ColCount As Integer
Dim RowCount2 As Integer
Dim ColCount2 As Integer
Dim RowCount3 As Integer
Dim ColCount3 As Integer
Dim RowCount4 As Integer
Dim ColCount4 As Integer
Dim RowCount5 As Integer
Dim ColCount5 As Integer
Dim RowCount6 As Integer
Dim ColCount6 As Integer
Dim RowCount7 As Integer
Dim ColCount7 As Integer
Dim RowCount8 As Integer
Dim ColCount8 As Integer
Dim I As Integer
Dim sb As SolidBrush
Dim fn As Font
Dim x As Integer = 460
Dim y As Integer = 335
Dim x2 As Integer = 200 '620
Dim y2 As Integer = 25
Contenido = e
RowCount = AztecFontObj.GetRows()
ColCount = AztecFontObj.GetCols()
sb = New SolidBrush(Color.Black)
fn = New Font("MW6 Matrix", System.Convert.ToInt16("10"), GraphicsUnit.Pixel)
e.Graphics.DrawImage(Imagen, 60, 35)
'Contenido.Graphics.DrawString("─────────────────────────────────────────────────────────────────────────", New Font("Times New Roman", 9), Brushes.Black, 0, 410)
'Contenido.Graphics.DrawString("USO CLIENTE", New Font("Times New Roman", 10), Brushes.Black, 140 + 455, 110)
'Contenido.Graphics.DrawString("*" & Cod_Banco & "*", New Font("3 of 9 Barcode", 23), Brushes.Black, 140 + 390, 125)
'Contenido.Graphics.DrawString(Cod_Banco, New Font("Times New Roman", 10), Brushes.Black, 140 + 455, 150)
'e.Graphics.DrawImage(Imagen2, 230 + 50, 90 + 30)
'Contenido.Graphics.DrawString("DESTINO", New Font("Times New Roman", 20), Brushes.Black, 20 + 220, 120)
Contenido.Graphics.DrawString("╔══════════════════════════════════════════╗", New Font("Arial Black", 8), Brushes.Black, 45, 2 + 13)
Contenido.Graphics.DrawString(" FECHA: " + Fec_Des, New Font("Arial", 8), Brushes.Black, 45, 2 + 26)
For Z = 1 To 6
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Contenido.Graphics.DrawString(" CENTRO DE DISTRIBUCION BANCOESTADO", New Font("Arial", 6), Brushes.Black, 45, 2 + Salto + 6)
Contenido.Graphics.DrawString(" AV. MATTA #934, SANTIAGO", New Font("Arial", 6), Brushes.Black, 45, 2 + Salto + 14)
Contenido.Graphics.DrawString(" FONO: 9709985", New Font("Arial", 6), Brushes.Black, 45, 2 + Salto + 22)
Contenido.Graphics.DrawString(" T:" + TimeOfDay(), New Font("Arial", 8), Brushes.Black, 45, 2 + Salto + 13)
Salto = Salto + 13
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
For Z = 7 To 10
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Salto = Salto + 13
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Contenido.Graphics.DrawString(" DIREC: " + Direccion1, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 5)
Contenido.Graphics.DrawString(" SUC: " + Ciudad, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto - 10)
Contenido.Graphics.DrawString(" PARA: " + Nom_Destina, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto - 25)
For Z = 11 To 19
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
'e.Graphics.DrawImage(Imagen4, 60, Salto - (13 * 6))
e.Graphics.DrawImage(Imagen2, 250, Salto - (13 * 5))
Contenido.Graphics.DrawString("*" & OrFle & "*", New Font("3 of 9 Barcode", 15), Brushes.Black, 200, Salto - (13 * 1.5))
Contenido.Graphics.DrawString("OF:" & OrFle & "", New Font("Times New Roman", 10), Brushes.Black, 200, Salto - (5 * 1))
RowCount = AztecFontObj.GetRows()
ColCount = AztecFontObj.GetCols()
sb = New SolidBrush(Color.Black)
fn = New Font("MW6 Matrix", System.Convert.ToInt16("10"), GraphicsUnit.Pixel)
For I = 0 To (RowCount - 1)
'print one line using Aztec font
'e.Graphics.DrawString(AztecFontObj2.GetRowStringAt(I), fn, sb, 120, 60 + 475 + 110 + I * fn.GetHeight)
e.Graphics.DrawString(AztecFontObj.GetRowStringAt(I), fn, sb, 60, Salto - (13 * 5.5) + (I * fn.GetHeight))
Next I
Salto = Salto + 13
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
For Z = 20 To 21
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Salto = Salto + 13
Contenido.Graphics.DrawString(" PROYECTO:" + Proyecto, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 5)
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
For Z = 22 To 25
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Salto = Salto + 13
Contenido.Graphics.DrawString(" MODELO: " + Modelo, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 5)
Contenido.Graphics.DrawString(" MARCA: " + Marca, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto - 10)
Contenido.Graphics.DrawString(" TIPO: " + Observaciones, New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto - 25)
Contenido.Graphics.DrawString("╚══════════════════════════════════════════╝", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Salto = Salto + 26
Contenido.Graphics.DrawString("╔══════════════════════════════════════════╗", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto)
'Salto = Salto + 13
Contenido.Graphics.DrawString(" SERIE N°", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Salto = Salto + 52
For Z = 28 To 28
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Salto = Salto + 13
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
For Z = 29 To 33
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Contenido.Graphics.DrawString("*" & SN & "*", New Font("3 of 9 Barcode", 25), Brushes.Black, 60, Salto - 13)
Contenido.Graphics.DrawString("" & SN & "", New Font("Times New Roman", 10), Brushes.Black, 60, Salto + 15)
Salto = Salto + 13
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Salto = Salto + 13
Contenido.Graphics.DrawString(" CATASTRO N°", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Salto = Salto + 52
For Z = 34 To 35
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Salto = Salto + 13
Contenido.Graphics.DrawString("╠══════════════════════════════════════════╣", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
e.Graphics.DrawImage(Imagen3, 340, Salto + 28)
For Z = 35 To 40
Salto = Salto1 * Z
Contenido.Graphics.DrawString("║ ║", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
Next Z
Contenido.Graphics.DrawString("*" & Catastro & "*", New Font("3 of 9 Barcode", 25), Brushes.Black, 60, Salto - 13)
Contenido.Graphics.DrawString("" & Catastro & "", New Font("Times New Roman", 10), Brushes.Black, 60, Salto + 15)
Salto = Salto + 13
Contenido.Graphics.DrawString("╚══════════════════════════════════════════╝", New Font("Arial Black", 8), Brushes.Black, 45, 2 + Salto + 13)
RowCount2 = AztecFontObj2.GetRows()
ColCount2 = AztecFontObj2.GetCols()
sb = New SolidBrush(Color.Black)
fn = New Font("MW6 Matrix", System.Convert.ToInt16("10"), GraphicsUnit.Pixel)
sb.Dispose()
fn.Dispose()
sb.Dispose()
fn.Dispose()
End Sub
Agradeceré de antemano la ayuda que me puedan prestar.