sending more than 1 page to a printer

This is a discussion on sending more than 1 page to a printer within the C++ Programming forums, part of the General Programming Boards category; I am trying to send the contents of a widow to a printer, however, I can only get 1 page ...

  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    2

    sending more than 1 page to a printer

    I am trying to send the contents of a widow to a printer, however, I can only get 1 page to print. There should be several pages. I am using this
    StartPage(hdcPrinter);
    byteswritten=DrawTextEx(hdcPrinter, pszWindowText, -1, &rect,
    DT_NOPREFIX |
    DT_WORDBREAK |
    DT_NOCLIP |
    DT_TOP |
    DT_LEFT |
    DT_EXPANDTABS, &dtp);
    EndPage(hdcPrinter);
    EndDoc(hdcPrinter);

    Is this the correct way? It works for one page. byteswritten is returned with half of the characters in the window.

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    416
    I believe you have to tell it to print the second page, or third or fourth etc. It doesn't know how many pages you want to print, it just knows what will fit on a page.

    Then again I never made a program to print something

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. why page based I/O can improve performance?
    By George2 in forum C Programming
    Replies: 1
    Last Post: 06-12-2006, 07:42 AM
  2. virtual memory
    By sweets in forum C Programming
    Replies: 6
    Last Post: 11-06-2004, 05:55 AM
  3. Sending window to printer
    By Bazzz in forum C++ Programming
    Replies: 3
    Last Post: 07-30-2004, 09:49 AM
  4. Sending to printer
    By spentdome in forum C Programming
    Replies: 36
    Last Post: 05-29-2002, 07:28 PM
  5. sending data to printer port
    By lliero in forum C Programming
    Replies: 3
    Last Post: 11-20-2001, 03:57 AM

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