Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
Spanning images across multiple pages
posted

Hi,

I'm trying to add a long image to an Infragistics document.  The image could be quite tall since it is a chart and could thus need to span multiple pages.          

I'm currently using the code below, however when I view the resulting report the image is cropped short at the page boundry, but is not continued onto the following page.

Is there a way to make this happen?

Thanks

Chris

 

            Bitmap bitmap = new Bitmap(chart.Width, chart.Height);
            chart.DrawToBitmap(bitmap, new System.Drawing.Rectangle(0, 0, chart.Width, chart.Height));
            Infragistics.Documents.Graphics.Image igImage = new Infragistics.Documents.Graphics.Image(bitmap);
            IImage image = _section.AddImage(igImage);

  • 37774
    Suggested Answer
    posted

    Chris,

    I can't seem to find a way to be able to split an image element across multiple pages.  I think that your best option is to change the PageSize of the section itself to accommodate the size of the image (and therefore you might want to add multiple sections unless you want them all to be this size).  You should also be able to use the AddPage method on the section to add a single page and set the Width and Height there.

    -Matt