Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FPD26a DOS + Fonts + Big caracters

Status
Not open for further replies.

Foxtech

Programmer
May 26, 2001
66
CA
Hi everyone,

Does anyone who know the ASCII code to send to the printer? I would like to print the Invoice Number in big caracters for my labels.

Actually I send ??? chr(27) + 'W1' to the printer but the caracter is not big and visible enough. I want to print a little big bigger.

Pleas help????

I am using Fijutsu 4600 Dot matrix printer.

thanks a lot.
 
Have you tried the "Fijutsu 4600 Dot matrix printer" owner's manual? Have you tried the Fijutsu web site? Most printer manufacturers keep their documentation online and available to developers.

Rick
 
Rick's suggestion above is the best approach.

Unlike a Windows application (FPW or other) which utilizes Windows printer drivers to enable support of a wide range of fonts and font sizes, in the DOS world, you are typically more limited.

Generally you may choose between only the NORMAL, COMPRESSED, & LARGE (or EXPANDED) FONT. You may select between these by using the appropriate Printer Programming Command Language (PCL) command, but you generally cannot get additional size fonts.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
Can you use PCL? The PCL command is this:

Code:
pointsize="40"  && adjust value to get size desired
??? CHR(27)+"(s"+pointsize+"V"

The uppercase "V" at the end of the string is appropriate when there are no other printer PCL excape codes being appended to the stirng. If you want to tack on additional PCL commands, then end the string shown above with a lowercase "v", followed by the next codes.
 
Oh, if you want PCL's boldface:

Code:
pr_bold="3" && 0=regular, 1=semibold, 3=bold, 4=extrabold
??? CHR(27)+"(s"+pr_bold+"B"

Combine the two like this if you wish (or using them separately is okay too):

Code:
pointsize="40"  && adjust value to get size desired
pr_bold="3" && 0=regular, 1=semibold, 3=bold, 4=extrabold
??? CHR(27)+"(s"+pointsize+"s"+"(s"+pr_bold+"B"
 
Hi dbMark,

I am very appreciated that you sent me a PCL commands. If I use
1) ??? CHR(27)+"(s"+pointsize+"s"+"(s"+pr_bold+"B" what I have to send to printer to reset to normal print.

2)??? CHR(27)+"(s"+pr_bold+"B" what I have to send to printer to reset to normal print.


What is pointsize by default? Is it 10?

thanks a lot.
 
Perhaps you might want to consider going out to:

Where Fujitsu has online documents for the DL4600 printer including the Programmer's Manual (in PDF format).

It seems as though the answers to most of your printer PCL questions (not Foxpro questions) might be there.

As to the Reset, typically all Printer Programming Command Languages have a single Reset command which will restore ALL of the original settings after you have programmatically modified them.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
How to reset bold back to normal: Just set pr_bold=0 and printing the bold command will reset that back to normal (which is the zero setting).

How to reset point size back to normal: I'm not sure what the default is. There are about about 70 or 72 points per inch.

I think many dot matrix printers in the past were set with DIP switches to a default pitch, that is, characters per inch (CPI) with probably 10 or maybe 12 CPI as default settings. I don't know about today's printers. Laser printers often have a display screen where you select from a menu for the font and pitch. All of them are reconfigurable by software commands

I don't know exactly haw you compare pitch with points. As CPIs increase, the size (or points) of the characters decreases. My impression (not very scientific) was that 10 points looked a lot like 12 CPI pitch, and 12 points looks a lot like 10 CPI pitch.

Since I don't know what the default settings are, you may have to experiment with different values (maybe testing a different setting for each line on a page) in order to determine what the default was.

Here is code I used to test what I've said. Bold works fine, but (oh no!) on my Laser printer the pitch didn't change at all, maybe because I was in courier font, not proportional or another issue? I don't have any more time, so that's all I can help with this.

Esc = CHR(27)
FOR x = 6 TO 30 STEP 2
cx = LTRIM(STR(x))
SET PRINT ON
? Esc+"(s"+0+"V" ;
+cx+" Points" ;
+Esc+"(s"+4+"B" ;
+" Extra" ;
+Esc+"(s"+3+"B" ;
+" Bold" ;
+Esc+"(s"+1+"B" ;
+" Semi" ;
+Esc+"(s"+0+"B" ;
+" Normal"
* ? CHR(13)+CHR(10) && optional linefeed if using ???
SET PRINT OFF
NEXT
EJECT
? Esc+"E" && reset printer to power-on defaults
 
Okay, I gave it one more try. Since I couldn't get the "V" setting for POINT SIZE to work, I tried the commonly-used PITCH (CPI) with the above loop, replacing the "V" with "H" and it worked as expected. (As mentioned above, if you concatenate more than one printer instruction behind one {Esc} code, then capitalize only the LAST letter of the entire string.)

SET TALK OFF
Esc = CHR(27)
FOR x = 6 TO 30 STEP 2
* size starts huge and gets smaller with each loop
cx = LTRIM(STR(x))
SET PRINT ON
? Esc+"(s"+0+"H" ;
+cx+" Points" ;
+Esc+"(s"+4+"B" ;
+" Extra" ;
+Esc+"(s"+3+"B" ;
+" Bold" ;
+Esc+"(s"+1+"B" ;
+" Semi" ;
+Esc+"(s"+0+"B" ;
+" Normal"
* ? CHR(13)+CHR(10) && optional linefeed if using ???
SET PRINT OFF
NEXT
EJECT
? Esc+"E" && reset printer to power-on defaults
 
Argh! I forgot to cut and paste. (Why can't I delete my own earlier replies?) This is what I meant:

Code:
*SET TALK OFF
Esc = CHR(27)
FOR x = 4 TO 30 STEP 2
   * size starts huge and gets smaller with each loop
   cx = LTRIM(STR(x))
   SET PRINT ON
   ? Esc+"(s"+cx+"H"+cx+" Pitch" ;
    +Esc+"(s4B"+" Extra" ;
    +Esc+"(s3B"+" Bold" ;
    +Esc+"(s1B"+" Semi" ;
    +Esc+"(s0B"+" Normal"
   * ??? CHR(13)+CHR(10) && optional linefeed if using ???
   SET PRINT OFF
NEXT
EJECT
? Esc+"E"  && reset printer to power-on defaults
 
hi dbMark,

I have tried with ??? CHR(27)+"(s"+pr_bold+"B" and
??? CHR(27)+"(s"+pointsize+"V" but it didn't work on my DL3450 Fujitsu printer.

Did these commands use for Laser printer or Dot matrix?

I have tried these PCL commands below and I have got what I want.

??? CHR(27)+"W1" && double width
??? CHR(27)+"V1" && double height
??? CHR(27)+"G" && bold
? '123456'
***Reset to normal printing***
??? CHR(27)+"W0" && double width
??? CHR(27)+"V0" && double height
??? CHR(27)+"H" && bold

thanks a lots

 
Most dot printers take the original epson 105 escape sequences.

There were 2 modes. ESC/P mode and IBM mode. Diffreneces were minor.

If i remember, chr(18) wasd for bold.

I think chr(14) was for one line and so on...

End
 
Just a small note to clear up an issue I just discovered on my previous posts about printing bold text using program code. In one of my programs I had changed to another font for printing a particular page but then I noticed that the font changed when I issued the semi-bold setting to the printer, but not with the bold value. I'm not sure why, but neither do I want to spend the time researching this. Therefore, I would suggest using bold (value 3) not semi-bold ( value 1) that I'd mentioned in an earlier post, at least not without testing it first. Besides, on laser printers you won't notice a difference anyway.

Esc=CHR(27)
? Esc+"(s3B"+" Bold"
? Esc+"(s0B"+" Normal"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top