BUG: Generic / Text Only Printer Driver Prints 66 Lines

ID: Q87767


The information in this article applies to:


SYMPTOMS

Choosing the Generic / Text Only printer drivers in Microsoft Windows versions 3.0 and 3.1 may cause incorrect printing results in Visual Basic for Windows. Visual Basic expects to print 66 lines per page, but the generic printer driver only prints 60 lines per page. This results in six lines being printed on a separate page.


WORKAROUND

To work around the problem, select a different printer driver.


STATUS

Microsoft has confirmed this to be a bug in the Generic / Text Only printer driver included with the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available


MORE INFORMATION

When using the Generic / Text Only printer driver, the example below prints 60 lines on the first page, 6 lines on the second page, and then 60 lines on the third page. You may also encounter some lines being overwritten also with the Generic / Text Only driver supplied with Windows version 3.0.

Steps to Reproduce Problem

  1. From the Windows Control Panel, choose the Printers icon.


  2. From the Printers option, choose the Add Printer button.


  3. Select the Generic / Text Only printer driver.


  4. Choose the Install button. There is additional help on pages 145-147 of the "Microsoft Windows version 3.0 User's Guide." Note: You may need your Windows disks to install the Generic / Text Only driver.


  5. After the Generic / Text Only driver has been installed and is the default printer, you can proceed to run a test in Visual Basic.


  6. Start Visual Basic or if Visual Basic is already running, choose New Project from the File menu (ALT, F, N). Form1 is created by default.


  7. Add the following code to the Form_Click event procedure of Form1:
    
       Sub Form_Click ( )
          For i% = 1 to 200
             Printer.Print "This is a test of line number ";i%
          Next i%
          Printer.EndDoc
       End Sub
     


  8. From the Run menu, choose Start to run the program.


  9. Run the same code, by pressing the F5 function key and then click Form1 once, to run the test. This should produce five pages of text, the first and third pages should have 60 lines of text, while the second and fourth pages will only contain 6 lines of text. The fifth page should be half covered with lines of text. This is where the problem is, Visual Basic sends 66 lines to be printed per page, but the Generic / Text Only printer driver is setup to print only 60 lines. Then the printer driver does a formfeed, after printing the 6 lines on the second page to go on to the third page. The printer driver may also display a problem on some lines of code being overwritten (every fifth line may be overwritten).


Additional query words: buglist1.00 buglist2.00 2.00


Keywords          : 
Version           : 
Platform          : 
Issue type        : 

Last Reviewed: June 24, 1999