How to add an image to PDF export

4 posts, 0 answers
  1. leo
    leo avatar
    19 posts
    Member since:
    Mar 2014

    Posted 13 Jul 2014 Link to this post

    I would like to add an image (stored in DB) to my PDF export. Now I am exporting PDF using:


    I just want to add a single image to this pdf file from the database. Image will be outside the gridview lets say at the top left of the pdf file....

    I hope somebody can help me with this...
    SANJAY avatar
    61 posts
    Member since:
    Jun 2012

    Posted 13 Jul 2014 in reply to leo Link to this post

    Hi Leo

    To the best of my understanding you would not be able to get the image on the PDF through the export function of the Grid

    Option 1) Please try if you can get the image in row 1 of the grid and then export

    Option 2) Export the PDF then edit using itextsharp and then you could comfortably put the image at which ever location either before the grid or after the grid

  3. Mehmet
    Mehmet avatar
    100 posts
    Member since:
    Jun 2014

    Posted 13 Jul 2014 Link to this post

    any ideas why could this error come up ?

    Invalid XHTML. RadGrid has to render correct XHTML in order to export to PDF.

    thank you
  4. Kostadin
    Kostadin avatar
    1733 posts

    Posted 16 Jul 2014 Link to this post

    Hi Mehmet,

    You could check out the following live example which demonstrates how to add an image in the header of the PDF page. Keep in mind that only images with relative and absolute path could be exported. Note that the binary image could will not be included in the exported document.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top