Printer.Font.Name and Printer.Font.Size problems with HP LaserJets 
Author Message
 Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

I am trying to print text to a group of HP LaserJet printers.  I have no
problem with postscript printers, but when I send to PCL printers using
printer.font.name and printer.font.size, I do not get the expected
results.  The Font and size are the default HP font.  I also use
printer.orientation with positive results.  Is this a bug in VB or what?
 Any info will be appreciated.  Thanx in advance.

Peter



Mon, 24 May 1999 03:00:00 GMT  
 Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

VB's printer object is nothing if not a bit weird.  The solution is to wake the
thing up before you set sizes and fonts.  ie.

Printer.Print ;
With Printer.Font
        .Size = 10
        .Name = "Arail"
        .Bold = True
End With

The other trick -- if you want a smaller than 8 point font.size -- set the size,
set the name, set the size again.  Don't ask! (That comes from the Help file,
btw.  The other doesn't, it comes from experience.)

  >I am trying to print text to a group of HP LaserJet printers.  I have no
  >problem with Postscript printers, but when I send to PCL printers using
  >printer.font.name and printer.font.size, I do not get the expected
  >results.  The Font and size are the default HP font.  I also use
  >printer.orientation with positive results.  Is this a bug in VB or what?
  > Any info will be appreciated.  Thanx in advance.

  >Peter



Tue, 25 May 1999 03:00:00 GMT  
 Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

Quote:

>I am trying to print text to a group of HP LaserJet printers.  I have no
>problem with Postscript printers, but when I send to PCL printers using
>printer.font.name and printer.font.size, I do not get the expected
>results.  The Font and size are the default HP font.  I also use
>printer.orientation with positive results.  Is this a bug in VB or what?
> Any info will be appreciated.  Thanx in advance.
>Peter

Two possible problems:

1. Bad drivers.  If there is an update available, get it and see if
the problem goes away.  I had this problem with the initial
drivers for the Laserjet IV.

2. Printer does not have the font available.  Laserjets come with a
certains set of fonts installed (for example the Laserjet II has
fonts called Line Printer and Courier but nothing else, each in
only one size).  Additional fonts can be download as soft-fonts
or added in a printer cartridge.  The printer driver has no way
of knowing if the cartridge or softfont is installed, so if you
ask for it it will assume it is available.  When the driver attempts
to change to a font that is not available, the Laserjet switches
to whatever it thinks is the closest thing that it has got.

----------------
James A. Parsly

----------------
Cryptogram Corner: http://www.public.usit.net/jparsly/



Tue, 25 May 1999 03:00:00 GMT  
 Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

Quote:

>I am trying to print text to a group of HP LaserJet printers.  I have no
>problem with Postscript printers, but when I send to PCL printers using
>printer.font.name and printer.font.size, I do not get the expected
>results.  The Font and size are the default HP font.  I also use
>printer.orientation with positive results.  Is this a bug in VB or what?
> Any info will be appreciated.  Thanx in advance.
>Peter

I Have the same problem.
I found many people here with the same problem.

But:

Printer.Fontname="Times NEw Roman"
Printer.Fontsize=18
Printer.Print ""                  '   <- Here is the important
Printer.Print "Hello World! "

We don't know why, but it works!!

 Gerardo



Wed, 26 May 1999 03:00:00 GMT  
 Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

Quote:

> I Have the same problem.
> I found many people here with the same problem.

> But:

> Printer.Fontname="Times NEw Roman"
> Printer.Fontsize=18
> Printer.Print ""                  '   <- Here is the important
> Printer.Print "Hello World! "

> We don't know why, but it works!!

>  Gerardo

Thanx for the info.  I was also using a printer.orientation in my
coding.  I found that the above step only works if you put the
orientation step before everything else.  This is a really strange
problem, but I wanna thank all who have helped me.

Peter



Thu, 27 May 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. A HOW-TO: Setting Printer fonts: WAS Printer fonts

2. How to get the printer font names and their respective sizes

3. VB4: Printer.font.name problem

4. Making dotmatrix printer substitue device fonts for tt fonts

5. Paper size on HP LaserJet 4000 printer problem when printing from Crystal Reports

6. printer font size change

7. font and size with printer.print VB4

8. How to PRINT different size and font on the printer at the SAME line

9. Printer object and printer fonts

10. Why printer object won't stay reset to correct font/size

11. Printer font size

12. Printer Object VB4 still don't set Font Size - PLEASE HELP

 

 
Powered by phpBB® Forum Software