4 Answers, 1 is accepted
0
Philippe
Top achievements
Rank 1
answered on 30 Aug 2015, 01:28 PM
Figure it out, the font path was wrong.
Could you please ​include better errors? "Table head not found" when a font isn't loaded correctly?
0
Hello,
If the server properly returns a 404 HTTP status for URLs that cannot be resolved, you would get a good error message (something like "Cannot load URL: http://..." followed by "Cannot load font from http://...").
However, if the status is 200 (which means "OK") then we do indeed try to parse the output, because we can't know it's an error message or a font file. So I'm inclined to believe it's a server configuration issue.
Regards,
Mihai
Telerik
If the server properly returns a 404 HTTP status for URLs that cannot be resolved, you would get a good error message (something like "Cannot load URL: http://..." followed by "Cannot load font from http://...").
However, if the status is 200 (which means "OK") then we do indeed try to parse the output, because we can't know it's an error message or a font file. So I'm inclined to believe it's a server configuration issue.
Regards,
Mihai
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sangeetha
Top achievements
Rank 1
answered on 02 Jul 2016, 06:48 AM
Can you just share your code where you missed that font path because i couldnt figure that out
0
Hi Sangeetha,
If needed, please compare your implementation with the following demo:
http://demos.telerik.com/kendo-ui/scheduler/pdf-export
It uses hard-coded font URLs from Kendo UI version from 2014. In production applications, it is recommended to use the font files that correspond to the actual Kendo UI version. For seamless upgrade, you can use something like this:
Please keep in mind that font files must be located on the same domain as the web page, or the host domain must allow cross-domain Ajax requests, and the browser must support them.
http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#known-limitations
In case you need further assistance, please provide a runnable test page in a Dojo.
Regards,
Dimo
Telerik by Progress
If needed, please compare your implementation with the following demo:
http://demos.telerik.com/kendo-ui/scheduler/pdf-export
It uses hard-coded font URLs from Kendo UI version from 2014. In production applications, it is recommended to use the font files that correspond to the actual Kendo UI version. For seamless upgrade, you can use something like this:
kendo.pdf.defineFont({
"DejaVu Sans"
:
"//kendo.cdn.telerik.com/
"
+ kendo.version +
"
/styles/fonts/DejaVu/DejaVuSans.ttf"
,
"DejaVu Sans|Bold"
:
"//kendo.cdn.telerik.com/"
+ kendo.version +
"/styles/fonts/DejaVu/DejaVuSans-Bold.ttf"
,
"DejaVu Sans|Bold|Italic"
:
"//kendo.cdn.telerik.com/"
+ kendo.version +
"/styles/fonts/DejaVu/DejaVuSans-Oblique.ttf"
,
"DejaVu Sans|Italic"
:
"//kendo.cdn.telerik.com/"
+ kendo.version +
"/styles/fonts/DejaVu/DejaVuSans-Oblique.ttf"
});
Please keep in mind that font files must be located on the same domain as the web page, or the host domain must allow cross-domain Ajax requests, and the browser must support them.
http://docs.telerik.com/kendo-ui/framework/drawing/drawing-dom#known-limitations
In case you need further assistance, please provide a runnable test page in a Dojo.
Regards,
Dimo
Telerik by Progress
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps