470,815 Members | 1,313 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

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.PrinterSettings.PrinterNam e 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.PrinterSettings.PrinterName = "Zebra P110i USB Card Printer"

AddHandler printdoc.PrintPage, AddressOf printdoc_PrintPage


Private Sub printdoc_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)

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

e.Graphics.DrawImage(System.Drawing.Image.FromFile ("\tarjeta2.tif", True), cardSize)
e.Graphics.DrawString(gname, New System.Drawing.Font("Arial", 10.0F), Drawing.Brushes.White, New System.Drawing.PointF(130.0F, 173.0F))
e.Graphics.DrawString("www.gestamotors.com Tel: (81) 8128-5000", New System.Drawing.Font("ArialNarrow", 7.5), Drawing.Brushes.DarkSlateGray, New System.Drawing.PointF(120.0F, 193.0F))
e.Graphics.DrawString("*" & gcard & "*", New System.Drawing.Font("IDAutomationHC39M", 8.0F), System.Drawing.Brushes.Black, New System.Drawing.PointF(8.0F, 162.0F))

End Sub
Aug 6 '07 #1
0 1243

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Jody Gelowitz | last post: by
1 post views Thread by NickB | last post: by
reply views Thread by Stephen Muecke | last post: by
5 posts views Thread by C-Services Holland b.v. | last post: by
3 posts views Thread by John Peterson | last post: by
2 posts views Thread by sitemap | last post: by
18 posts views Thread by Brett | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.