Printing to the Printer in C Language wherein you can specify the format of the font

What codes in C Language in particular do i need in order to print to the printer the strings like "Hello World" with the specified font that i want like Gothic font, Times New Roman, ....

I have tried printing to the printer but it usually comes out with the default font which i think is like Courier, which is like a typewritter font.

I used this code in doing my printing job --> fprintf(stdprn,"%s",string)

Example of my code:

#include <conio.h>
#include <stdio.h>

void main()
{
   char S[100] = "Hello World\n\r";
   fprintf(stdprn,"%s",S);
}


What code do i also need in order to have the printer print in landscape instead of portrait.

---------               -----------------------
|          |                |                           |
|          |                |                           |
|          |                |                           |
|          |            -----------------------
|          |
---------


PORTRAIT                              LANDSCAPE


I have read one of the question about printing and it was suggesting about escapecodes for formatting. Where can i get those escape codes?


Thank You in advance....
uy_andrewAsked:
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.

gj62Commented:
What OS are you on?  If Windows, are you writing a console application, or a Windows app?  What type of printer are you using?
0
mlmccCommented:
listening
0
mlmccCommented:
Do you have the printer manual?  Does it have escape codes?

mlmcc
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

uy_andrewAuthor Commented:
I have solved my problem by using registers in C Program. The problem now is how to Envoke the Printer to Print in Landscape Orientation? What Printer Codes shall i use if i am using Epson Printer especially dot matrix epson printer like Epson LX300. I am in a Windows Environment but the program is in MS-DOS environment.
0
mlmccCommented:
Can it print in landscape or dsoe your program have to do that?

mlmcc
0
gj62Commented:
According to the documentation, the Epson LX300 does not have a landscape print mode.

You're program would have to define it's own font and print in graphics mode in order to do this - that would be quite an extensive driver that you  would have to write...

Epson has all their documentation online at www.epson.com - you can check out any printer you need there (well, any Epson printer that is...)
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
uy_andrewAuthor Commented:
To mlmcc: Its my program that needs to do the landscape thing. Anyway, Thank you for helping me solve the problem.

To g162: Thank You. I think i have solved my problem.
0
gj62Commented:
Great - good luck...
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
Fonts Typography

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.