printing multiple pages in C# -



printing multiple pages in C# -

i print 2 pages in application when utilize code behind, i'm in never ending loop.

e.hasmorepages = true; e.graphics.drawstring("hello", new font("verdana", 12), new solidbrush(color.black), new point(10, 10)); e.graphics.drawstring("page 2", new font("verdana", 12), new solidbrush(color.black), new point(10, 2000));

if place e.hasmorepages = true; in comment print first page. can help me?

e.hasmorepages has no effect in middle of print routine. in case, create global variable e.g. count = 1, , then:

if (count == 1) { e.graphics.drawstring("hello" + count, new font("verdana", 12), new solidbrush(color.black), new point(10, 10)); e.hasmorepages = true; } else { e.graphics.drawstring("hello again", new font("arial", 12, fontstyle.regular), brushes.black, 100, 100) e.hasmorepages = false; } count++;

ps: haven't tried code myself though.

c# printing

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -