Thread: Newbie Printer Formatting Question

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    16

    Newbie Printer Formatting Question

    Hi,

    This is probably a very simple question, but none of my C course notes or reference books cover it. Can you write code to alter the default font, it's size, the page layout etc, from within a program.

    So far all my programs produce Times New Roman in Portrait layout.



    I am using Visual C++ 6.0 and the printer (if it makes a difference) is an old Epson 740.


    Thanx in advance

    foffo

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    After a bit of digging around the epson site (you should do this), it seems that what you need is

    http://www.epson.co.uk/support/manuals/select/escp.htm

    Basically, if you need to send say "ESC R" to the printer (space is for readability), you would write "\033R" in your code

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    16
    Very informative but a little too much for this relative newbie!

    Having done a little more research myself, I found some code containing the sort of stuff I was after.


    #include "printer.h"



    landscape( prn_fp, ON );
    bold( prn_fp, ON );


    etc
    ( prn_fp obviously a pointer to the printer stream )


    My new questions are, is this a standard C header file ?
    and can you specify fonts?

    cheers

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > My new questions are, is this a standard C header file ?
    No

    > and can you specify fonts?
    Hard to say - what's in that .h file.

    It probably only covers the basic stuff. Pretty much every printer can print bold text, so its a fair bet that there's a standard way of doing it (and hence why its in a .h file).

    More advanced things are more likely to be printer specific, and therefore not capable of being used with every printer (and hence not in a .h file).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 04:43 AM
  2. Newbie with Very Newbie Question
    By Jedi_Mediator in forum C++ Programming
    Replies: 18
    Last Post: 07-01-2008, 08:00 AM
  3. dos game help
    By kwm32 in forum Game Programming
    Replies: 7
    Last Post: 03-28-2004, 06:28 PM
  4. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 04:38 PM
  5. confusion with integers (newbie question)
    By imortal in forum C Programming
    Replies: 7
    Last Post: 12-06-2002, 04:09 PM