44037

SVG content of Telerik RadHtmlChart

Question:

Currently, I have an aspx page in vb that launches a RadHTMLChart and I want to grab the SVG code of that chart. However, since the chart is rendered client-side, I have to launch this aspx page and then grab the SVG code from a second aspx page during postback. Currently, I am using Server.Execute (firstpage.aspx) to grab the SVG code but this does not work. I want to use the SVG to generate a PDF document but the Server.Execute command seems to run in the background and the code that comes after it do not wait for it to finish first, hence I am not grabbing the SVG content. Does anyone know of another way to grab this SVG content?

Answer1:

It seems you need all of this done on the server, so you need to find a way to launch a browser on the server, get the needed data from it and close it. I think a tool called PhantomJS can do this for you, so you can give it a crack (it's free I think).

Here is an example on exporting an HtmlChart, but it relies on a user interaction (which can be automated via some scripts) but it needs the page opened on the client machine: <a href="http://www.telerik.com/support/code-library/exporting-radhtmlchart-to-png-and-pdf" rel="nofollow">http://www.telerik.com/support/code-library/exporting-radhtmlchart-to-png-and-pdf</a>. Anyway, it may still be helpful for ideas and to show how to get the SVG string.

Recommend

  • Conditional “OR” operation in RewriteRule
  • NativeScript Angular 2 disable swipe back on ios
  • How to access to a function in a specific js file from navigation Bar in React Native?
  • Angular 2 and ASP.NET MVC 4 routing are not working together
  • How to display the images in listview
  • Get the number 18437736874454810627
  • Is there a way to dynamically embed PDF Files in a JSP pulled from the file system?
  • Creating PDF from TIFF image using iText
  • SetWindowsHookEx does not react on media keys
  • Security issues with PHP's Readfile method
  • onBackPressed() not being executed
  • How do I get HTML corresponding to current DOM tree?
  • JQuery Internet Explorer and ajaxstop
  • JSON response opens as a file, but I can't access it with JavaScript
  • Jenkins: How To Build multiple projects from a TFS repository?
  • How do I fake an specific browser client when using Java's Net library?
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • Resize panoramic image to fixed size
  • Volusion's generic SQL folder, functionality
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • Change an a tag attribute in JavaScript based on screen width
  • Delete MySQLi record without showing the id in the URL
  • Apache 2.4 - remove | delete | uninstall
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • R: gsub and capture
  • SVN: Merging two branches together
  • Hibernate gives error error as “Access to DialectResolutionInfo cannot be null when 'hibernate.
  • jqPlot EnhancedLegendRenderer plugin does not toggle series for Pie charts
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Comma separated Values
  • Load html files in TinyMce
  • Free memory of cv::Mat loaded using FileStorage API
  • How do you join a server to an Active Directory (domain)?
  • Why joiner is not used after Sequence generator or Update statergy
  • coudnt use logback because of log4j
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Programmatically clearing map cache
  • Android Heatmap on canvas or ImageView
  • How to load view controller without button in storyboard?