1. printing question

When I'm printing to an Epson, HP laser, HP Inkjet from a non windows
computer the printout has a font and pitch size that are all the same.
(however these OS's can't print to a "windows only" printer). I don't know
how in Win32 to match these printouts. I select the font by using code as
follows:

 prtOptions = getPrinter()
 if len(prtOptions)> 0 then
  printerFont = 12 -- start big
  charsPerLine = 0 -- init
  printerSize = getExtent( Printer )  -- get the size of a printer page
  while charsPerLine< rptWidth do
   setFont( Printer, "Courier New", printerFont, Normal )
   fontSize = getFontSize( Printer ) -- get the font metrics
   charsPerLine = floor(printerSize[1]/fontSize[1])
   printerFont -= 1
  end while
  if charsPerLine>rptWidth then
   ptab = space(floor((charsPerLine - rptWidth)/2))
  else
   ptab = ""
  end if
  linesPerPage = floor(printerSize[2]/fontSize[2])

The font and pitch I can match across a line, but the line spacing is off
and I don't know what to do about that in a way that is not dependent on the
specific printer. I increment the line I'm printing on like this:

    setPosition(Printer,0,line*(fontSize[2]-3))

This by trial and error (the -3) matches on an HP 890C but I doubt it might
match on others.

any susggestions would be appreciated
thanks

george

new topic     » topic index » view message » categorize

2. printing question

hi.
My program needs to print a report when it gets finished.  I prepare the
report, which looks kinda like this:
=B3                        Memory Assessment Program                      =
=B3
=B3                        Student Report 10/20/1997                      =
=B3
=B3Student: Michael Packard    Sex:Male  Age:31  Date of Birth: 01/11/1966=
=B3
=B3         1218 Karen Ave                                                =
=B3
=B3         Santa Ana, Ca 92704                                           =
=B3
=B3         (714) 839-4265                                                =
=B3
=B3              Visual Test                    Auditory Test             =
=B3
=B3       =DA=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=
=C4=C4=C4=BF        =DA=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=
=C4=C4=C4=C4=BF        =B3
=B3       =B3            123456789  =B3        =B3           123456789 =B3 =
       =B3
=B3       =B3Immediate   =B0=B0=B0=B0=B0=B0=B0=B0=B0  =B3        =B3Immedia=
te  =B0=B0=B0=B0=B0=B0    =B3        =B3
=B3       =B3Short Term  =B1=B1=B1=B1=B1=B1     =B3        =B3Short Term =
=B1=B1=B1=B1=B1=B1=B1   =B3        =B3
=B3       =B3Long Term   =B2=B2=B2=B2=B2      =B3        =B3Long Term  =B2=
=B2=B2=B2=B2     =B3        =B3
=B3       =C0=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=
=C4=C4=C4=D9        =C0=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=C4=
=C4=C4=C4=C4=D9        =B3
=B3            Ordered Recall                   Ordered Recall            =
=B3
=B3                                                                       =
=B3

and I print it like this:

printer=3Dopen("PRN","w")
  if printer=3D-1 then puts(1,"you have a problem with the printer")=20
  else for i =3D 1 to length(report) do
       puts(printer,report[i]&"\n")
       end for
       puts(printer,12)  --form feed
   end if

This works great on my cannon bubblejet, but NOT on my bosses HP laserjet.
"I print all the time, just now in windows!  You must be an idiot!"

how do I get it to work on that printer?  It's standard ascii text,
nothing fancy, but I need to be able to print on any printer, without
having to have the people using the program tell it what kind of printer
they have.=20

They tried printing the report in dos Edit and it didn't do it either. (as
I'm directing them over the phone, again see quote above...)

Michael Packard
Lord Generic Productions
=20

new topic     » goto parent     » topic index » view message » categorize

3. Re: printing question

what's the deal with the =3D things?  I've NEVER had those inseted in any
of my messages on here before, now I get a hundred of them?  weird.

Michael

new topic     » goto parent     » topic index » view message » categorize

4. Re: printing question

Michael Packard wrote:
> what's the deal with the =3D things?  I've NEVER had those inseted in any
> of my messages on here before, now I get a hundred of them?  weird.

        Don't use MIME !!!
        The list-server screws MIME up big time!!
        Choose for normal text output.
        And attach using UUEncode.

        I hope this works for you, Packard.

        (BTW To all those people sending HTML mail, the list-server screws them
up too, and not all people have a HTML capable mail program anyway, it's
about the contents not all the different fonts, sizes and colors)

Ralf Nieuwenhuijsen
nieuwen at xs4all.nl

new topic     » goto parent     » topic index » view message » categorize

5. Re: printing question

>what's the deal with the =3D things?  I've NEVER had those inseted in any
>of my messages on here before, now I get a hundred of them?  weird.
>
>Michael
        I have been getting lots of them for a month or so. I was too
bashful to ask about them.
Arthur P. Adamson, The Cincinnati Engine Man, euclid at isoc.net

new topic     » goto parent     » topic index » view message » categorize

6. Re: printing question

Reply to printing question by Michael Packard:

You haven't got an answer to your original question about the printer at
your work office. At least not through this channel.
You said you got nothing at all printed by opening a file as "prn", "w".
Maybe (it is my 2 cents worth opinion) you should try opening it using
"lpt1", or "lpt2", etcetera. I myself cannot tell you what difference thi=
s
would make. My computer and printer do the printing with "prn" *and*
"lpt1".

Maybe this can help you,

Sincerely,

Ad Rienks
email Ad_Rienks at compuserve.com
writing at 0:47 , =

on Monday 20 October 1997

new topic     » goto parent     » topic index » view message » categorize

7. Re: printing question

Michael Packard wrote:

> This works great on my cannon bubblejet, but NOT on my bosses HP laserjet.
> "I print all the time, just now in windows!  You must be an idiot!"
>
> how do I get it to work on that printer?  It's standard ascii text,
> nothing fancy, but I need to be able to print on any printer, without
> having to have the people using the program tell it what kind of printer
> they have.=20
>
> They tried printing the report in dos Edit and it didn't do it either. (as
> I'm directing them over the phone, again see quote above...)
>
Michael:

It's been a long time, but I vaguely remember having to send a "reset" sequence
to some models of  Laserjets before they will print plain ascii. They can be put
into all sorts of weird modes by windoze and various applications. Check the
manual that came with the printer for these codes.
Ask your client to type 'dir' at the c:> prompt, then hit screen print - see if
that
prints ok. If not, the problem is deeper than Euphoria.

As far as being able to print without specifying the printer, good luck. There
are just too many non-standard "standards".  The real problem is that even
if you supply proper software for every printer, your users will often be
unable to determine which printer they have - so, back to square one!

Irv

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu