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

PDF Export - Images missing

1 Answer 115 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Michael asked on 15 Jun 2015, 10:22 AM

Hi - I have the following Grid with Images:

.DataSource(dataSource => dataSource // Configure the grid data source
    .Ajax() // Specify that ajax binding is used
    //.Read(read => read.Action("Articles_Read", "Parts").Data("additionalInfo")) // Set the action method which will return the data in JSON format
    .Aggregates(a => a.Add(c => c.Price).Sum())
.Columns(columns =>
    columns.Bound(a => a.StockCode).Title("Artikelnummer");
    columns.Bound(a => a.ImageUrl).ClientTemplate("<img src='#=ImageUrl#' alt='#=StockCode #' title='#=StockCode #' width='55' />").Title("Bild");
    columns.Bound(a => a.StockBalance).Title("Lagerbestand");
    columns.Bound(a => a.Price).Title("Preis").Format("{0:C}")
        .ClientFooterTemplate("Total #= kendo.toString(sum, 'C')#");
.Pageable() // Enable paging
.Sortable() // Enable sorting
.Selectable(n => n.Mode(GridSelectionMode.Single))
.ToolBar(tools => tools.Pdf())
.Pdf(pdf => pdf
    .FileName("Kendo UI Grid Export.pdf")
    .ProxyURL(Url.Action("Pdf_Export_Save", "Parts"))
//.Events(e => e.DataBound("fDataChanged"))

When I export to PDF, the Images are missing in the PDF File.

Images in the Sample here

are exported though. What am I doing wrong?

Thank you.


1 Answer, 1 is accepted

Sort by
T. Tsonev
Telerik team
answered on 17 Jun 2015, 12:15 PM

The PDF export module might not be able to export images hosted on a different domain. See Known Limitations.
Setting up permissive Cross-Origin HTTP headers should help in this case.

I hope this helps.

T. Tsonev
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question