how to change epson lx 300 font size using escape character

hi, i am using delphi to develop application that need to emulate line printer,

my question is as the title, how to change epson lx 300 font size using escape character


thanks
enshrentkoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

twinsoftCommented:
Hi use the following code:

type
 TPrintType = (ptBold, ptCondessed, ptLargeFont, ptMediumFont, ptUnderLine, ptItalics);

function TForm1.SetFont(aPrintType: TPrintType): String;
var
 aValue: Integer;
begin
 Result := '';
 aValue := 0;
 if Condessed in aPrintType then aValue := aValue or 4;
 if Bold in aPrintType then aValue := aValue or 8;
 if MediumFont in aPrintType then aValue := aValue or 16;
 if LargeFont in aPrintType then aValue := aValue or 32;
 if Italics in aPrintType then aValue := aValue or 64;
 if UnderLine in aPrintType then aValue := aValue or 128;
 Result := #27#33 + Chr(aValue);
end;

To use it code a procedure like this:

var
 aPType: TPrintTypes
 s: String;
begin
  aPType := [ptLargeFont]; // or other combinations
  s := SetFont(aPType);
  // then send s to the printer before printing the line
end;



0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
enshrentkoAuthor Commented:
it works actually, but what i need is font size that smaller than MediumFont,

any insight?

thanks
0
twinsoftCommented:
Then you should use an empty variable

aPType := [];
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.