Hot Topic (More than 10 Replies) Anyone using a dot matrix printer with Sesame? (Read 1848 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Anyone using a dot matrix printer with Sesame?
Mar 12th, 2007 at 6:22pm
Print Post Print Post  
I'm having some success using PrintString() to print to my networked dot-matrix printers, but one thing is puzzling me: everything that prints is printing very darkly, as the printer is making several passes over each lime (as if I had specified bold, which I have not.  Has anyone else tackled this?

I'm using an Epson LQ-590, and here is a sample of my code:

Code
Select All
var vMonthName as string
var vDayNumber as string
var vYearNumber as string
var vFullDate as string

vMonthName = @MONTH$(Invoice_Date)
vDayNumber = @DOM(Invoice_Date)
vYearNumber = @YEAR(Invoice_Date)
vFullDate = vMonthName + " " + vDayNumber + ", " + vYearNumber

NewPage(850,1100)
AlternateDefaultPrinter("\\MIARA_1\Invoice")
Printstring(vFullDate,550,110,0,"Courier",15,0)
Printstring(Purchase_Order_No,550,150,0,"Courier",15,0)
Printstring(Attn,550,185,0,"Courier",15,0)
Printstring(Workorder_No_1,650,210,0,"Courier",15,0)
FinishPage() 



Other than the heavy printing, it's working quite nicely, although there's probably a cleaner way to get the date to print the way I want it to.

Thanks in advance for any help.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Anyone using a dot matrix printer with Sesame?
Reply #1 - Mar 12th, 2007 at 6:45pm
Print Post Print Post  
I figured it out: wrong driver.  Fixed.  Thanks anyway.
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Anyone using a dot matrix printer with Sesame?
Reply #2 - Mar 13th, 2007 at 12:22pm
Print Post Print Post  
Another question for anyone who has had dot matrix experience:  I'm using Printstring() commands of the following type:

Code
Select All
Printstring(Purchase_Order_No, 550, 168, 0, "Courier", 15, 0) 



As you can see, I'm specifying Courier.  However, everything is printing in Arial on the Epson LQ-590.  When I print to my HP Laserjet 5P, I get Courier.  Any hints on what I may be doing wrong?  TIA.
  

**
Captain Infinity
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #3 - Mar 13th, 2007 at 9:02pm
Print Post Print Post  
Hi Scott.

I suspect that you may need to send printer codes to the dot matrix vs. a font name.  Your HP is designed to deal with different windows fonts, but your dot matrix is probably limited.  Check the manual for the Epsom, check out printer codes for different fonts.

But with that said, I don't see any Printer Command to send printer strings.  So you may need to call a batch file or use @Shell to "echo" the printer codes > lpt1. 

I may be totally wrong on this, but that is the direction I would be heading in if I was working on this myself.  Hopefully this provides you with some other ideas to think about.

You may also be able to use the echo/batch file as part of the computer startup process so it is already set with fonts that you want before you need to call it with Sesame.  Printer configuration menu on the printer may also allow setting it when printer is turned on.

  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #4 - Mar 13th, 2007 at 9:25pm
Print Post Print Post  
Infinity,

Looking at the windows driver for your printer I see that it only supports three sizes of the courier font, and these are measured in CPI (not points or pixels). I suspect that, if you want to specify the size in Sesame you will have to use on of the two scalable fonts available: Roman and Sans Serif (probably this is the Arial you are seeing). These can be specified in points, given an even number from 8 to 32. It is likely you will only be able to use the other eight fonts available if you are able to convert the pixels to CPI (characters per inch) and specify a legal size. Even with the two scalable fonts, you will have to try several pixels sizes to find one that matches a point size between 8 and 32 that is an even number.

Additionally, you might try placing a space before the name of the font in the print string call:
Code
Select All
Printstring(Purchase_Order_No, 550, 168, 0, " Roman", 15, 0)
 



Resident Fonts:
Epson Draft 10, 12, 15 cpi
Epson Roman 10, 12, 15 cpi proportional
Epson Sans Serif 10, 12, 15 cpi proportional
Epson Courier 10, 12, 15 cpi
Epson Prestige 10, 12 cpi
Epson Script 10 cpi
Epson OCRB 10 cpi
Epson Script C Proportional
Epson Orator 10 cpi
Epson Orator-S 10 cpi

Epson Roman 10.5 pt; 8-32 pt every 2 pt
Epson Sans Serif 10.5 pt; 8-32 pt every 2 pt
Epson Roman T 10.5 pt; 8-32 pt every 2 pt
Epson Sans Serif H 10.5 pt; 8-32 pt every 2 pt
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #5 - Mar 13th, 2007 at 9:46pm
Print Post Print Post  
Hi Mark,

Can you please elaborate more on:

Quote:
Additionally, you might try placing a space before the name of the font in the print string call:


Should this always be the case or just with dot matrix printers? I have had no known problems without the space so far, should I change it to a space in all my code to be safe?

Thanks for keeping us informed.
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #6 - Mar 13th, 2007 at 9:51pm
Print Post Print Post  
BOBSCOTT wrote on Mar 13th, 2007 at 9:46pm:
Hi Mark,

Can you please elaborate more on:

Quote:
Additionally, you might try placing a space before the name of the font in the print string call:


Should this always be the case or just with dot matrix printers? I have had no known problems without the space so far, should I change it to a space in all my code to be safe?

Thanks for keeping us informed.


Usually the safest choice is to not change working code. If it is working for you and the fonts appears as they should - don't change anything.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #7 - Mar 13th, 2007 at 10:22pm
Print Post Print Post  
Thanks for the advise  Smiley
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Anyone using a dot matrix printer with Sesame?
Reply #8 - Mar 14th, 2007 at 3:53pm
Print Post Print Post  
Quote:
I suspect that, if you want to specify the size in Sesame you will have to use on of the two scalable fonts available: Roman and Sans Serif (probably this is the Arial you are seeing). These can be specified in points, given an even number from 8 to 32. It is likely you will only be able to use the other eight fonts available if you are able to convert the pixels to CPI (characters per inch) and specify a legal size. Even with the two scalable fonts, you will have to try several pixels sizes to find one that matches a point size between 8 and 32 that is an even number.

Excellent information, thanks to both you and Bob.  I've discussed the issue with my boss and we've agreed that the work involved to get Courier (which is what Q&A was using) does not justify carrying the convention forward, so we are going with the Arial (or San Serif, if that is the case).

A couple more questions: should I specify "San Serif" as my font?  "Arial" and BArial" seem to be working, as does specifying sizes of 15 and 17.  I'm curious about the requirement for an even number.  Should I be specifying 16 and 6, or something like that?  The Fontsize in the example on page 136 of the programming manual specifies 33 (which, if I used, would be enormous).

Again, mostly curiosity, as what I have now is actually working and I've got some nice looking invoices printing out.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #9 - Mar 14th, 2007 at 4:06pm
Print Post Print Post  
Quote:
A couple more questions: should I specify "San Serif" as my font?  "Arial" and BArial" seem to be working, as does specifying sizes of 15 and 17.  I'm curious about the requirement for an even number.  Should I be specifying 16 and 6, or something like that?  The Fontsize in the example on page 136 of the programming manual specifies 33 (which, if I used, would be enormous).


If Arial is working it is probably "falling back" to a default sans serif font. The font size in Sesame is specified as pixels (physical dots). The printer accepts the font size as either points (1/72 of an inch) for some fonts, or CPI (characters per inch) for others. The driver is in charge of translating the font size as specified in pixels to the nearest legal font size specified in points or CPI. So, when you see an example in the Sesame manual, you are seeing a numbers specified as pixels. So a font with a size of 17 in Sesame, means that that font is 17 physical pixels tall, without regard for how big a pixel is. If a font is 17 points tall, it is going to be printed so that it is 17/72'nds of an inch tall. If it is 17 CPI, then we know it is a fixed width font and 17 letters (wide) will fit in an inch - thus, they are all 1/17th of an inch wide.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Anyone using a dot matrix printer with Sesame?
Reply #10 - Mar 14th, 2007 at 4:30pm
Print Post Print Post  
Thanks for your help, Mark.  I changed my font specification to "SanSerif" and "BSanserif" and set my standard font size to 16 (with occasional pops up to 18 and 22, and one drop down to 10 for some teeny  tiny type at the bottom of the page, shhhh, don't tell the customer it's there) and my invoices look better than ever.  You guys are the greatest!
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: Anyone using a dot matrix printer with Sesame?
Reply #11 - Mar 14th, 2007 at 4:36pm
Print Post Print Post  
One last question, Mark:  where did you find the Printer Driver specs you quoted?  I could probably use such a resource in the future.  Thanks.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Anyone using a dot matrix printer with Sesame?
Reply #12 - Mar 14th, 2007 at 4:43pm
Print Post Print Post  
Infinity wrote on Mar 14th, 2007 at 4:36pm:
One last question, Mark:  where did you find the Printer Driver specs you quoted?  I could probably use such a resource in the future.  Thanks.


I just googled the printer model name and make. It was within the first few matches.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged