Export PDF - Insert Image at specific location

5 posts, 0 answers
  1. Bil@l
    Bil@l avatar
    40 posts
    Member since:
    Oct 2005

    Posted 03 Dec 2015 Link to this post

    Hi,

    I am in need to export an HTML page to PDF. However, I want to place an image on a specific location on the exported PDF. Is this doable with the current PDF Export feature?

     

    Thank you,

  2. Bil@l
    Bil@l avatar
    40 posts
    Member since:
    Oct 2005

    Posted 03 Dec 2015 in reply to Bil@l Link to this post

    If this feature is not supported, at least, can I place a transparent image on the export PDF and then later on using itext library or others, be able to find out that image and replace it with something else?

     

    Thanks

  3. Kendo UI is VS 2017 Ready
  4. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 04 Dec 2015 Link to this post

    Hello,

    You may use the special k-pdf-export CSS selector in combination with a selector for the corresponding image to make that image visible for the ClientExportManager when exporting. You may hide it initially with display none and change its display to block with this selector. Thus, the image will be visible for the export only.

    Regards,
    Dimitar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  5. Bil@l
    Bil@l avatar
    40 posts
    Member since:
    Oct 2005

    Posted 04 Dec 2015 in reply to Dimitar Link to this post

    Thanks Dimitar,

    What I am after is that, I want to embed maybe a text/image, then when I load the PDF using itext library to parse the PDF, I want to detect that placeholder inside the PDF. 

     

    Thanks

  6. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 07 Dec 2015 Link to this post

    Hi,

    The PDF Export allows you to change the appearance with some styles applied through the corresponding CSS class from my previous post. You could manipulate the page with JavaScript, if you would like to place something on it while exporting and then remove it after export is complete. This approach, however, is out of the scope of the PDF Export.

    Regards,
    Dimitar
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready