dcsimg
Results 1 to 3 of 3

Thread: Dotmatrix Printing from vb6

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2019
    Posts
    9

    Question Dotmatrix Printing from vb6

    Hello friends,

    My program is developed in VB6 and i'm using crystal report to print invoices in laser/inkjet printers.
    Now I want to print invoice in dot matrix printer. But i have faced paper feed problem because I'm using 6 inch paper roll. (Empty spaces when moving to next page)

    So i have googled and found result which i need to create text file (.txt) to print. But i want to bold some fields and make size larger for some fields. you know this is not possible in .txt files.

    So is there any other ways to make it possible ??


    Thank you,

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    20,422

    Re: Dotmatrix Printing from vb6

    Normally such a printer would be used along with a printer driver so that GDI/WinSpool printing can be used to achieve effects like bold, font sizes, graphics, etc.

    There can be issues to consider. For example it might be possible to use a driver that makes use of native font and drawing support in the printer instead of composing then printing full bitmaps which can be slower. Your make and model of printer and its drivers will determine your options.

    There is usually driver support for paper length or page size. In VB6 you'd use Printer.PaperSize and other related properties. If you are going to use 3rd party reporting tools you should look for some equivalent.

    With some effort VB6 can use API calls to do "raw" printing as well. Then your program must know specific things about specific printers in order to send the proper control characters and escape sequences to perform various operations. I doubt any random 3rd party software is going to do that. The technique was largely abandoned by software vendors when they moved out of the dark world of MS-DOS and came out into the light with Windows.

    Since 6 inches is not a standard form length a VB6 program would have to assign Printer.Height that value in ScaleMode units. That will select "custom" PaperSize (vbPRPSUser). Whether that works depends on your printer and its driver.

    Doing that in some 3rd party software depends on what that software supports.


    So in the end this isn't a VB6 question at all. You might try your vendor's product documentation and support web site instead after reading your printer's documentation.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2019
    Posts
    9

    Re: Dotmatrix Printing from vb6

    thank you dilettanete,

    but its quite difficult to understand what you are saying...actually this program is point of sale software.. I'm gonna install this in many places where my clients using different brands of dot matrix printer.. so will i need to modify my codes for each printer brands because you know each has different drivers???

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width