Código:
El problema, es que me imprime el codigo html y no el contenido (imagen en este caso) del html.Private Sub prtDocument_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles prtDocument.PrintPage 'Esta linea me exporta un bitmap de un objeto axMap Me.AxMapa.ExportMap2(ESRI.MapObjects2.Core.ExportMapConstants.moExportBMP, "c:\borrame.bmp", 1) Dim Doc = New System.IO.StreamReader("C:\imprimir.htm") Dim linesPerPage As Single = 0 Dim yPos As Single = 0 Dim count As Integer = 0 Dim leftMargin As Single = e.MarginBounds.Left Dim topMargin As Single = e.MarginBounds.Top Dim line As String = Nothing Dim PrintFont As Font = New Font("Arial", 10) linesPerPage = e.MarginBounds.Height / PrintFont.GetHeight(e.Graphics) While count < linesPerPage line = Doc.ReadLine() If line Is Nothing Then Exit While End If yPos = topMargin + count * PrintFont.GetHeight(e.Graphics) e.Graphics.DrawString(line, PrintFont, Brushes.Black, leftMargin, yPos, New StringFormat) count += 1 End While If (Not line Is Nothing) Then e.HasMorePages = True Else e.HasMorePages = False End If End Sub
Espero que me puedan ayudar.
Saludos!