Telerik
Home / Community / Forums / Telerik Reporting / Exporting to TIFF

Not answered Exporting to TIFF

Feed from this thread
  • Kenneth Jackson avatar

    Posted on Jun 29, 2009 (permalink)

    I'm trying to export to tiff and using the code detailed in this article, http://www.telerik.com/community/forums/reporting/telerik-reporting/tif-rendering-extension-not-working.aspx . The difference is that we are using winforms .

    I keep getting a RendererNotAvailable exception , I use very similar code for our PDF exports and that works just
    fine but not with the TIFF format. Is there an include I am missing or a config that needs setup ? I am explicitly
    declaring the deviceinfo hashtable as per the article linked but to no avail.

    Reply

  • Telerik Admin admin's avatar

    Posted on Jun 30, 2009 (permalink)

    Hi Kenneth Jackson,

    It is very hard to pinpoint a potential problem without any relevant code/sample as the code in the referenced article does work as expected and is not relevant to whether it is used in web or windows forms. Do you need to have the TIFF settings initialized programmatically or can it be in app.config? If the latter please check this KB article as well.
    If still having problems, please open a support ticket and attach a sample project which we can use to replicate the issue on our end.

    Kind 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.

    Reply

  • Kenneth Jackson avatar

    Posted on Jul 1, 2009 (permalink)

    Steve I could use either and the KB article was exactly what I needed :)  Thank you for that.

    Out of interest is there an example anywhere of how the tiff settings can be initialized programmatically
    rather than through the app.config file ?

    Reply

  • Telerik Admin admin's avatar

    Posted on Jul 1, 2009 (permalink)

    Hi Kenneth Jackson,

    When exporting through the viewer there is no other way to configure the extension except through the configuration file. However, if you render the report manually by using the ReportProcessor.Render method then you can set all the parameters through the device info. Here is an example:

    string ext; 
                string mimeType; 
                Encoding encoding; 
                Hashtable deviceInfo = new Hashtable(); 
                deviceInfo["OutputFormat"] = "TIFF"
                deviceInfo["TiffCompression"] = "ccitt4"
                byte[] result = ReportProcessor.Render("IMAGE"new Report1(), deviceInfo, out mimeType, out ext, out encoding); 
                using (FileStream fs = new FileStream("C:\\Report1.tiff", FileMode.Create)) 
                { 
                    fs.Write(result, 0, result.Length); 
                } 

    Note the the name of the rendering extension is IMAGE (not TIFF). Tiff is specified by the OutputFormat parameter in the device info.

    Greetings,
    Chavdar
    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.

    Reply

Related resourses for "Exporting to TIFF"

Features  |  Documentation  |  Demos  |  Telerik TV  |  Knowledge Base  |  Code Library  |  Step-by-step Tutorial  |  Blogs  |  Whitepaper  ]

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.