Printers
Old
  (#1)
Joel Ribiat
Guest
 
Posts: n/a
Default Printers - 06-04-2007, 08:53 AM

We are a small programming company that has customers with Okidata printers
(set to IBM emulation). We do not want to print in a font that would result
in near letter quality printing as it is very slow. So in our code we have
printer.font = "12 CPI HSD", or "10 CPI UTILITY". Sometimes we need 12
pitch, other times 10 pitch. If anyone can help with these questions, it
would be appreciated:
1) After the printer.enddoc command, do we need to set the printer back to
some sort of default? Because it seems if we do the 12-pitch, it stays in
12-pitch.
2) Sometimes, our customers might want to print their invoice to a laser
printer, in which case the above fonts won't work. Is there a way to
determine if the current printer is a laser/inkjet so we can use a different
pitch and/or font?
3) If we set our Okidata dot matrix driver to Generic / Text Only, then it
prints in HSD mode, but doesn't recognize any commands. Maybe there's a
trick to getting it to recognize pitch?

If someone has an article or web site on the inner workings of the printer
object, that would be great. So far, I'm having trouble finding out what all
the commands are


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Printers
Old
  (#2)
edoepke
Guest
 
Posts: n/a
Default Re: Printers - 06-04-2007, 08:53 AM

1) Try ***igning the required pitch to a variable such as pptich(0)= "12 CPI
HSD", ppitch(1) = "10 CPI UTILITY". Therefore you can ***ign the required
pitch with a simple Option button choice before the document is printed
(ie:Printer.Font = ppitch(x)) .

2) I'm not sure what you're asking for but there are many ways to find the
printdevice on a system. Here is a small API function that returns the
printer properties. From that you can write some code for use with the
printers you desire.

Private Declare Function OpenPrinter Lib "winspool.drv" Alias "OpenPrinterA"
(ByVal pPrinterName As String, phPrinter As Long, pDefault As Any) As Long
Private Declare Function ClosePrinter Lib "winspool.drv" (ByVal hPrinter As
Long) As Long
Private Declare Function PrinterProperties Lib "winspool.drv" (ByVal hwnd As
Long, ByVal hPrinter As Long) As Long
Private Sub Form_Load()

Dim hPrinter As Long
OpenPrinter Printer.DeviceName, hPrinter, ByVal 0&
PrinterProperties Me.hwnd, hPrinter
ClosePrinter hPrinter
End Sub

I hope this helps a little.



"Joel Ribiat" <EMAIL REMOVED> wrote in message
news:F%Myb.11058$EMAIL REMOVED...
> We are a small programming company that has customers with Okidata

printers
> (set to IBM emulation). We do not want to print in a font that would

result
> in near letter quality printing as it is very slow. So in our code we have
> printer.font = "12 CPI HSD", or "10 CPI UTILITY". Sometimes we need 12
> pitch, other times 10 pitch. If anyone can help with these questions, it
> would be appreciated:
> 1) After the printer.enddoc command, do we need to set the printer back to
> some sort of default? Because it seems if we do the 12-pitch, it stays in
> 12-pitch.
> 2) Sometimes, our customers might want to print their invoice to a laser
> printer, in which case the above fonts won't work. Is there a way to
> determine if the current printer is a laser/inkjet so we can use a

different
> pitch and/or font?
> 3) If we set our Okidata dot matrix driver to Generic / Text Only, then it
> prints in HSD mode, but doesn't recognize any commands. Maybe there's a
> trick to getting it to recognize pitch?
>
> If someone has an article or web site on the inner workings of the printer
> object, that would be great. So far, I'm having trouble finding out what

all
> the commands are
>
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Printers
Old
  (#3)
J French
Guest
 
Posts: n/a
Default Re: Printers - 06-04-2007, 08:53 AM

My inclination would be to byp*** the printer driver and print
directly to the Spooler using the OpenPrinter API

Not exactly the 'Windows Way', but OKI line printers are not really
Windows printers

IIRC there is a command for setting OKIs back to their 'turn on' state
- however it is probably better to explicitly do this yourself

Another poster answered most of the rest.

On Mon, 01 Dec 2003 19:54:13 GMT, "Joel Ribiat" <EMAIL REMOVED>
wrote:

>We are a small programming company that has customers with Okidata printers
>(set to IBM emulation). We do not want to print in a font that would result
>in near letter quality printing as it is very slow. So in our code we have
>printer.font = "12 CPI HSD", or "10 CPI UTILITY". Sometimes we need 12
>pitch, other times 10 pitch. If anyone can help with these questions, it
>would be appreciated:
>1) After the printer.enddoc command, do we need to set the printer back to
>some sort of default? Because it seems if we do the 12-pitch, it stays in
>12-pitch.
>2) Sometimes, our customers might want to print their invoice to a laser
>printer, in which case the above fonts won't work. Is there a way to
>determine if the current printer is a laser/inkjet so we can use a different
>pitch and/or font?
>3) If we set our Okidata dot matrix driver to Generic / Text Only, then it
>prints in HSD mode, but doesn't recognize any commands. Maybe there's a
>trick to getting it to recognize pitch?
>
>If someone has an article or web site on the inner workings of the printer
>object, that would be great. So far, I'm having trouble finding out what all
>the commands are
>
>


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top