This is a migrated thread and some comments may be shown as answers.

Export PDF - Insert Image at specific location

4 Answers 320 Views
Drawing API
This is a migrated thread and some comments may be shown as answers.
Bilal Haidar
Top achievements
Rank 2
Bilal Haidar asked on 03 Dec 2015, 09:33 AM

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,

4 Answers, 1 is accepted

Sort by
0
Bilal Haidar
Top achievements
Rank 2
answered on 03 Dec 2015, 10:03 AM

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

0
Dimitar
Telerik team
answered on 04 Dec 2015, 11:17 AM
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!
 
0
Bilal Haidar
Top achievements
Rank 2
answered on 04 Dec 2015, 11:47 AM

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

0
Dimitar
Telerik team
answered on 07 Dec 2015, 08:33 AM
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!
 
Tags
Drawing API
Asked by
Bilal Haidar
Top achievements
Rank 2
Answers by
Bilal Haidar
Top achievements
Rank 2
Dimitar
Telerik team
Share this question
or