Results 1 to 8 of 8

Thread: printing directly to printer Port problem

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    25

    printing directly to printer Port problem

    Hi, getting weir problem with printing directly to printer port with API. It seems like it prints one copy and then if press to print again it will not print.. .. checked spooler and there is nothing in spooler. Click a couple of times and it will print out but with previous data. Does anyone have this problem b4?

  2. #2
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: printing directly to printer Port problem

    Can you give us a code snippet to look at?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    25

    Re: printing directly to printer Port problem

    I am using http://support.microsoft.com/?scid=kb;EN-US;322090
    RawprinterHelper Class from above.
    ==========================================
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    Dim t As String
    t = "This is a test"

    Dim pd As New PrintDialog
    pd.PrinterSettings = New PrinterSettings

    If (pd.ShowDialog() = DialogResult.OK) Then

    RawPrinterHelper.SendStringToPrinter(pd.PrinterSettings.PrinterName, t)
    End If

    End Sub

  4. #4
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: printing directly to printer Port problem

    Difficult to say as they didn't put any error handling in their code.
    I will rewrite it and post it here tomorrow.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Nov 2005
    Posts
    25

    Re: printing directly to printer Port problem

    I am developing a POS app, and requires to print to Receipt printers. I did so digging, and it seems like there are many ways to have it print to this kind of printer. 1. with API & windows driver installed *which is what I am working on*, 2. using company DLLS (I am using STAR receipt printer, and they have a dll included for use in VB apps. Tried, same thing happens) 3. OLE printer drivers for direct access without installing windows driver. * This I haven't tried.

  6. #6
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Re: printing directly to printer Port problem

    Did you ever get an answer to this? I am experiencing the same thing.

  7. #7
    Member
    Join Date
    Jun 2006
    Posts
    60

    Re: printing directly to printer Port problem

    Quote Originally Posted by Merrion
    Difficult to say as they didn't put any error handling in their code.
    I will rewrite it and post it here tomorrow.

    Took him a while to rewrite it two lol

  8. #8
    New Member
    Join Date
    Jul 2006
    Posts
    2

    Re: printing directly to printer Port problem

    Sorry to hear that. Thanks for getting back to me though.

    I think what I am going to try next is to write a dll using VB6 to print and call it from the main app I'm writing.

    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width