Thread: printer driver programming

  1. #1
    Registered User
    Join Date
    Jan 2003
    Posts
    56

    Question printer driver programming

    would it be possible to make a printer driver that gets information
    and turn is 90 dicrais around with c++

    this is for trying to get rappidfile to print landscape
    if x == y , y == x

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    Not without knowing a good deal more about which OS/Compiler/Printer/.... you have
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jan 2003
    Posts
    56
    the os is windows 98
    the printer is hp deskjet 5600 series
    compiler dev-c++ (4)

  4. #4
    Registered User
    Join Date
    Jan 2004
    Posts
    37
    If you were running this on Windows it would be fairly easy. You just have to get the device context for the printer and then draw the string at 90 degrees into the graphics context. I'm not sure how you would do it from a Unix program.

  5. #5
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Originally posted by CompURocket
    If you were running this on Windows it would be fairly easy. You just have to get the device context for the printer and then draw the string at 90 degrees into the graphics context. I'm not sure how you would do it from a Unix program.
    Uhh... he's using Windows 98, so why'd you bring up *NIX?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  6. #6
    Registered User
    Join Date
    Jan 2004
    Posts
    37
    I guess I didn't read that line about Windows 98.

    Just create a common print dialog box with the PD_RETURNDC flag set. This will give you the device context for the printer that you will be able to "draw" on using GDI.

    You will have to create a custom font with the vertical properties and use it to "draw" your text.

    References:
    Look on MSDN for LOGFONT and its members lfEscapement and lfOrientation.

    Here is a link that might help:
    http://www.codeguru.com/mfc/comments/27249.shtml

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Set Printer Prior To Loading Print Dialog Box
    By Beaner in forum Windows Programming
    Replies: 3
    Last Post: 10-10-2008, 01:02 PM
  2. Replies: 0
    Last Post: 07-28-2008, 03:10 AM
  3. changing property (layout) of a printer
    By leojose in forum Windows Programming
    Replies: 5
    Last Post: 12-05-2005, 07:16 AM
  4. Success - Output to Printer
    By noraa in forum C Programming
    Replies: 5
    Last Post: 08-04-2002, 09:12 AM
  5. Printing to Printer via Device Driver
    By JamMan in forum C++ Programming
    Replies: 1
    Last Post: 11-19-2001, 05:20 PM