Setting a Custom Print Size: BUG?

  • Thread starter Thread starter Jordan
  • Start date Start date
J

Jordan

I have written a small C# application that will print out
labels from a little label printer we have. However the
size (how long the label is) is determined by a database
call.

I need to specify a custom paper size every time the
print button is clicked. Is there a way to set a custom
print size on the fly?

I read somewhere else on the newsgroup that you can't do
that, and its a bug in the framework and I would have to
use API calls. I am trying to avoid that as much as I
possibly can.

Thanks in advance.
 
I have written a small C# application that will print out labels from a
little label printer we have. However the size (how long the label is) is
determined by a database call.

I need to specify a custom paper size every time the print button is
clicked. Is there a way to set a custom print size on the fly?

I read somewhere else on the newsgroup that you can't do that, and its a
bug in the framework and I would have to use API calls. I am trying to
avoid that as much as I possibly can.

Thanks in advance.

I haven't done much printing, but look at handling the PrintPage event.
You get handled a graphics object that you draw on as if it were the
screen. Different sized labels would be drawn differently.

Take care to specify HasMorePages = false when you are done or you will
print infinite blank pages (trust me).
 
Back
Top