Click or drag to resize

ImagePrintDocumentGetImage Event

Occurs when the print job requires the next image to print.

Namespace:  Atalasoft.Imaging.WinControls
Assembly:  Atalasoft.dotImage.WinControls (in Atalasoft.dotImage.WinControls.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
public event PrintImageEventHandler GetImage

Value

Type: Atalasoft.Imaging.WinControlsPrintImageEventHandler
Remarks
Handle this event to pass in one image at a time rather than loading all of the images at once. For this to work correctly, the Image and Images properties must be null.
Examples
GetImageExample (C#)
private void PrintWithGetImage()
{
    ImagePrintDocument doc = new ImagePrintDocument();
    doc.GetImage += new PrintImageEventHandler(doc_GetImage);
    doc.AfterPrintPage += new PrintImageEventHandler(doc_AfterPrintPage);
    doc.Print();
    doc.Dispose();
}

private void doc_GetImage(object sender, PrintImageEventArgs e)
{
    // Get the next image to print.
    e.Image = GrabNextImage();
}

private void doc_AfterPrintPage(object sender, PrintImageEventArgs e)
{
    if (MoreImagesToPrint())
        e.HasMorePages = true;
    else
        e.HasMorePages = false;
}
See Also