Re: Simple printing and graphics



I'm still confused. The objects should draw themselves when they need to.
This is essentially what the Control.Paint method does. So, you don't store
images; you store the data that defines what the images are to be drawn. You
could store the images too, but that would be counter-productive in most
situations. You only need them when you need them. As for "Graphics," I'm
not sure you're talking about images or the Graphics class. If you're
talking about the Graphics class, as I said, it is provided in the Print
event handler (just like in the Paint event handler). You also have to
handle transparency and Z-Levels.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Big thicks are made up of lots of little thins.


"Chris Dunaway" <dunawayc@xxxxxxxxx> wrote in message
news:1152214250.531207.208600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Kevin Spencer wrote:
I'm confused. You say you want "sugggestions on how to implement the
rendering of each page." This would refer, I presume to "printing each

I'm sorry for the confusion, I guess my intent is not clear. I want to
wrap the .Net printing method into a simpler class. I understand how
the HasMorePages and the event model of the .Net PrintDocument classes
work. I want to create a class that wraps that functionality up into
an easy to use class. For example of what I am trying to do,
originally in the .Net 2.0 Beta there was a class called
SimplePrintDocument but it was not included in the final release. Here
is a link that describes that class:

http://wesnerm.blogs.com/net_undocumented/2004/05/easier_printing.html

I want to create a class similar to that which encapsulates the
complexity of the .Net net printing method.

My idea was to create a simple class called say, EasyPrintDocument.
That class would have a pages collection Using that class would follow
the pattern below:

EasyPrintDocument epd = new EasyPrintDocument();

EasyPrintPage page = epd.AddPage();

page.DrawText("Blah Blah", 100. 40); //draws text at location 100,
40 on this page.
page.DrawCircle(50, 50, 10); //draws circle of radius 10 at location
50, 50 on this page.

Once the user has added all the pages they need the document, they
would call a method on my class to acutally kick off the printing
process:

epd.PrintIt();

Behind the scenes, this would use the normal .Net printing methodology,
including the HasMorePages.

I want to *hide* that complexity in an easy to use class.

My question was, specifically, how to store the page images until the
user calls the PrintIt method of my class. In other words, can I
create a collection of Graphics objects, for example, and then use them
when it comes time to print my pages? How can I create a Graphics
object with the same dimensions of the printer?

I hope I have explained better what I want.

Thanks again for taking time to respond.



.



Relevant Pages

  • Re: Graphic in doc inverted / black Word X and Word 2004
    ... Often you can fix these black graphics by simply double-clicking the picture ... > images are affected, but not all. ... > store is sufficient for screen display, but not for print unless it is ...
    (microsoft.public.mac.office.word)
  • Re: Insert images into DB
    ... Unless you have only a handful of low-resolution images, you cannot really use an OLE Object field to store images, because the database bloats so fast. ... I am aware of the OLE object field but don't know how to use it I plan to create categories so that I can show clients the graphics of what the stamp will look like. ...
    (microsoft.public.access.forms)
  • Re: Pic Placeholders
    ... But if I start PSP first, ... inline graphics are visible in Normal view provided you do ... :> images on them. ... :> A wise monkey is a monkey who doesn't monkey ...
    (microsoft.public.word.formatting.longdocs)
  • Re: Pic Placeholders
    ... "Picture placeholders" affects only inline graphics. ... I wasn't aware of the difference and -Inline- images do indeed ... A wise monkey is a monkey who doesn't monkey ...
    (microsoft.public.word.formatting.longdocs)
  • Re: [Fwd: Re: [PHP] Displaying information from table graphically]
    ... Imagemaps have absolutely nothing to do with divs. ... Since you would be using coordinates to composite the images, ... dont even know how complex it is generating graphics this way. ... Ash ...
    (php.general)