Newbie Printer Formatting Question

This is a discussion on Newbie Printer Formatting Question within the C Programming forums, part of the General Programming Boards category; Hi, This is probably a very simple question, but none of my C course notes or reference books cover it. ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,333
    > 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, 05:28 PM
  4. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 03:38 PM
  5. confusion with integers (newbie question)
    By imortal in forum C Programming
    Replies: 7
    Last Post: 12-06-2002, 03:09 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21