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

Export Configuration

1 Answer 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Naphtali
Top achievements
Rank 1
Naphtali asked on 26 Aug 2009, 07:35 AM
Hi,

I am developing reports using version 2009 Q2 sp1 through the use of the web report viewer.
I would like to have all my reports that are exported to PDF to have the setting of "FontEmbedding" set to "None".
I know this can be done via the configuration as explained here: http://www.telerik.com/help/reporting/configuring-telerik-reporting.html
My problem is that I can't add this code to the web.config. It is a team decision not to add such code to the configuration files. 
The WinForms version of the ReportViewer has a export event that could probably be used. What about the web ReportViewer?
Is there a work around for this?

Naphtali

 

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 26 Aug 2009, 08:13 AM
Hello Naphtali,

The only other way to set the device information settings is in code, while exporting programmatically:

                Hashtable devinfo = new Hashtable();
                devinfo["FontEmbedding"] = "None";

                ReportProcessor reportProcessor = new ReportProcessor();
                RenderingResult buffer = reportProcessor.RenderReport("PDF", reportToExport, devinfo);
                using (FileStream fs = new FileStream(@"C:\sample.pdf", FileMode.Create))
                {
                    fs.Write(buffer.DocumentBytes, 0, buffer.DocumentBytes.Length);
                }

Regards,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
General Discussions
Asked by
Naphtali
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or