I'm trying to export a RadHtmlChart with a header area that contains the company logo. On my development machine everything works fine. The logo appears on screen and in the exported pdf. But on our test server and the customer's test server the logo is visible only on screen and NOT in the PDF. I assume it's a path problem but I can't find any solution.
Any ideas somebody?
Thanks in advance.
Ruggero
<
div
id
=
"PdfOutputArea"
>
<
div
id
=
"PdfHeader"
style
=
"visibility: visible;height: 80px;padding-left: 20px;"
>
<
p
>Auswertung erstellt am <%# DateTime.Now.ToString("dd.MM.yyyy") %> durch <%# SessionHelper.BenutzerVorname %> <%# SessionHelper.BenutzerNachname %></
p
>
<
img
src
=
"~/Images/LOGO.png"
runat
=
"server"
/>
</
div
>
<
telerik:RadHtmlChart
runat
=
"server"
ID
=
"OOSChart"
>
[... more code ...]
</
telerik:RadHtmlChart
>
</
div
>
<script type=
"text/javascript"
>
function
ExportOOSChartToPDF(sender, args) {
$find(
'<%=RadClientExportManager1.ClientID%>'
).exportPDF($(
"#PdfOutputArea"
));
}
</script>var relativePath =
"~/api/export/file"
;
RadClientExportManager1.PdfSettings.ProxyURL = ResolveUrl(relativePath);
7 Answers, 1 is accepted
The experienced behavior is most probably due to insufficient permissions given to the image shown in the header. You can easily test it by trying to open it directly through the URL, e.g.:
http://yourSiteName.com/Images/LOGO.png
Another approach you can try in order to see whether you have enough permissions in the whole Images folder, is the one explained in this help article: An error like "... because the application did not have enough permissions..." occurs only in a production environment
I hope this information will be helpful for you.
Regards,
Vessy
Telerik
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.
Isn't the pdf rendered on client side from javascript?
Yes, when using the ClientExportManager the exporting is done on the client, but still if the application does not have permissions to access a file the exporting cannot proceed with it. Nevertheless if the image is loaded properly even when it cannot be exported this should not be the problem in this case.
I tried to reproduce the problematic behavior on my side but to no avail - the header image was exported properly both through Cassini and IIS. For convenience I am attaching my test page to this reply - can you add it to your application and see whether the problem can be reproduced with it?
Looking forward to hearing from you,
Vessy
Telerik
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.
Now I'm feeling quite stupid ;). I had the same problem with your example what me rethink what you said about permissions. The site I'm working on is secured by some IIS authentication method. A user needs to be logged in for access to files and folders. So I disabled authentication for the 'Images" Folder and voila, it works.
Thank you so much for your help and sorry for the trouble.
Kind regards,
Ruggero
I am glad the provided example was helpful in narrowing down the source of the problem. As always, should you face any further Telerik related difficulties do not hesitate to drop us a line. :)
Regards,
Vessy
Telerik
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.
Hello,
I got the similar problem. My logo doesn't get exported to the PDF file. The logo is located in a virtual directory on another drive. I tried the above link to test the folder permissions and every permission has passed. I've used several third party PDF components currently and in the past and never have this issue. Any idea?
Thanks.
Please, examine the following help article and make sure that the suggested response headers are configured:
http://docs.telerik.com/devtools/aspnet-ajax/controls/clientexportmanager/troubleshooting/known-limitations
Regards,
Vessy
Telerik