none
Print Document ignores the longer lines .. RRS feed

  • Question

  • Hi, I'm working on vb.net and I've got into a printing issue. My problem is I want to print a report but if a line of text is longer then the page it simply ignores the remaining portion of the line, i want to print the remaining line on next page instead of new line, is it possible ?? and if anyone knows any solution to this problem please let me know ..

    thanks and regards ..

    Wednesday, June 26, 2013 6:26 AM

Answers

  • You're in complete control of the printing using the System.Drawing.Printing.PrintDocument class.  Modify your code in the PrintPage event to achieve your objectives.
    Wednesday, June 26, 2013 10:24 PM

All replies

  • You're in complete control of the printing using the System.Drawing.Printing.PrintDocument class.  Modify your code in the PrintPage event to achieve your objectives.
    Wednesday, June 26, 2013 10:24 PM
  • yep but I don't think it gives us that much flexibility .. my issue is i have a loop which print strings, total number of strings may be more then 50 and if a line of a page contain 3 strings then i want to print the next 3 strings on next page rather then next line. Please share your ideas.

    thanks and regards ..

    Thursday, June 27, 2013 7:15 AM
  • "yep but I don't think it gives us that much flexibility"

    How much flexibility do you need?  You can write any string with any font and format anywhere within the printable area of the page.  You can stop printing on one page and start printing on the next page by simply exiting the PrintPage event with e.HasMorePages = True.

    Thursday, June 27, 2013 7:31 AM
  • yep I tried e.HasMorePages it immediately start printing on the next page and ignores the rest of the text .. 

    my output my be looks like this ..

    Row1: 1  2  3  4 1  2  3  4 1  2  3  4 1  2  3  4 ......  continue to next page

    Row2: 1  2  3  4 1  2  3  4 1  2  3  4 1  2  3  4 ......  continue to next page

    Row3: 1  2  3  4 1  2  3  4 1  2  3  4 1  2  3  4 ......  continue to next page

    Thursday, June 27, 2013 7:46 AM
  • You should have a fellow coder help you modify your code to accomplish what you want.
    Thursday, June 27, 2013 12:43 PM