Resolving Font and Style Differences in Graph Charts Exported to PPTX and XLSX
Environment
| Product | Reporting |
Description
When exporting charts from Telerik Reporting to PPTX or Excel, the font and layout differ from the browser view and PDF exports. The font changes, and additional space is rendered in the exported files. The issue is isolated to Graph items, while Table items export correctly. The reports are generated in Visual Studio (.cs format) using the Calibri font.
Solution
To resolve font and layout differences in chart exports:
-
Ensure Font Availability on Target Systems:
- The OpenXML formats (PPTX, XLSX, and DOCX) rely on the target system to have the specified fonts (e.g., Calibri) installed. If the font is unavailable, a fallback font is used.
- Verify that Calibri is installed on the machine where the exported files are opened. For more details, refer to Fonts Requirements.
-
Embed Fonts in PPTX Files:
- Open the generated PPTX file on a machine with the Calibri font.
- Use the "Save As" option. In the dialog, expand the "Tools" button, select "Save Options," and enable "Embed fonts in the file."
-
Check for Overriding Styles:
- Review the report definition (
report.designer.cs) and any external stylesheets to ensure no conflicting or default font settings override the intended style for Graph items. - Refer to Styling Reports for more information.
- Review the report definition (
-
Reduce Extra Space in Office Exports:
- Office formats process layout and padding differently for Graph items, which may cause additional space.
- Reduce margins, padding, or explicitly set the Graph size in the report definition to minimize extra space.
-
Verify Server Font Availability:
- Ensure Calibri is installed on all servers used for rendering. Certain server environments may lack standard Windows fonts.