Help Printing Form Web Application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rafiki31
    New Member
    • Jun 2007
    • 5

    #1

    Help Printing Form Web Application

    I have been hitting walls trying to find the right way to print from a web application. Here is the thing, im implementing a webapplication for a kiosk. The kiosk has its own card printer. When i tested the application using my pc as a server everything worked perfectly. Of course this is because i hadnt realize that the server was the one sending the print promtp to the printer which was ALSO connected to my printer so when i published the application and loaded it on the real server of course it all failed horribly. I was using System.drawing. printing.Printe rSettings.Print erName but what i realized is that this only brings up the names of the printers installed on the server. And logically like the card printer isnt installed in the server it cant find it. What the hell can i do to make my application print on the client side ? Here is what i am printing, i used e.graphics to print what i needed.


    printdoc.Printe rSettings.Print erName = "Zebra P110i USB Card Printer"

    AddHandler printdoc.PrintP age, AddressOf printdoc_PrintP age

    printdoc.Print( )


    Private Sub printdoc_PrintP age(ByVal sender As System.Object, ByVal e As System.Drawing. Printing.PrintP ageEventArgs)

    Dim cardSize As New System.Drawing. Rectangle(0, 0, 345, 212)

    e.Graphics.Draw Image(System.Dr awing.Image.Fro mFile("\tarjeta 2.tif", True), cardSize)
    e.Graphics.Draw String(gname, New System.Drawing. Font("Arial", 10.0F), Drawing.Brushes .White, New System.Drawing. PointF(130.0F, 173.0F))
    e.Graphics.Draw String("www.ges tamotors.com Tel: (81) 8128-5000", New System.Drawing. Font("ArialNarr ow", 7.5), Drawing.Brushes .DarkSlateGray, New System.Drawing. PointF(120.0F, 193.0F))
    e.Graphics.Draw String("*" & gcard & "*", New System.Drawing. Font("IDAutomat ionHC39M", 8.0F), System.Drawing. Brushes.Black, New System.Drawing. PointF(8.0F, 162.0F))

    End Sub
Working...