Converting Line Chart to PDF

Thread is closed for posting
4 posts, 0 answers
  1. Ming
    Ming avatar
    2 posts
    Member since:
    Mar 2008

    Posted 15 Jan 2010 Link to this post

    We are using HTML to PDF converter (from Winnovative) to convert a page that has Telerik's line chart on it. All the other content on the page converts well. The chart does not convert.  Instead, the missing image (red x) appears. Has anyone seen this in the past? Did anyone find a way to get the chartimage.axd to render so we can get the chart source in the rendered page?
  2. Schlurk
    Schlurk avatar
    812 posts
    Member since:
    May 2009

    Posted 18 Jan 2010 Link to this post

    It sounds like perhaps the chart has not completely rendered therefore showing a red x instead of the image. When are you attempting to convert the page? I believe the entire page has to fully render in order for the conversion to work, so perhaps wait until a later event in the page's life cycle or have the conversion occur on a button click event.
  3. Ming
    Ming avatar
    2 posts
    Member since:
    Mar 2008

    Posted 19 Jan 2010 Link to this post

    HTML to PDF conversion is being done in a button click event after the entire page is rendered. When the page is rendered, we see the line chart properly. When the button click event is executed (the conversion code is in the click event), we get the missing image.
  4. Ves
    Ves avatar
    2926 posts

    Posted 20 Jan 2010 Link to this post

    Hello guys,

    The origin of the problem might be in the way the PDF converter handles HttpHandlers -- the chart image is served by an HttpHandler and if the converter does not support this, the image might not appear in the PDF document.

    Still, RadChart exposes a Save method allowing you to export the chart to an image on the server. You can use this method and create a separate image file and use this image in the page instead of the chart control. This will allow you to export the page to PDF.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top