Groups | Blog | Home
all groups > dotnet drawing api > february 2007 >

dotnet drawing api : forcing a formfeed with PrintDocument


Dave Cullen
2/25/2007 11:22:13 AM
Hello -

I'm using VB.NET 2005 and trying to get a handle on the PrintDocument thing.
I can print my document OK, but I need to know how to force a page break. In
the old days I'd simply tack a form feed CHR(12) at the spot where I want
the break, but PrintDocument ignores that and prints a little square box.

What I'm currently doing is creating a large string buffer formatted with my
data and invoking PrintDocument.Print(). There is a PrintPage sub that
apparently does all the work (I've copied code from Microsoft's "Simple
Printing" example).

Someone please give me some guidance here. It seems like a simple task.

Thanks

Lau Lei Cheong
2/26/2007 12:00:00 AM
Set ev.HasMorePages to true.

See "PrintDocument class"->"constructor" of MSDN library for example code.

"Dave Cullen" <nospam@mail.com> ¼¶¼g©ó¶l¥ó·s»D:e7FubkPWHHA.4028@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button