title: Server side generation of image
body: <p>I am using highstock library to generate chart on my website. I want to use the same charts in my pdf reports. I found these articles on their website:</p>
  
  <p><a href="http://www.highcharts.com/component/content/article/2-articles/news/56-improved-image-export-with-phantomjs" rel="nofollow">http://www.highcharts.com/component/content/article/2-articles/news/56-improved-image-export-with-phantomjs</a></p>
  
  <p><a href="http://www.highcharts.com/component/content/article/2-articles/news/52-serverside-generated-charts" rel="nofollow">http://www.highcharts.com/component/content/article/2-articles/news/52-serverside-generated-charts</a></p>
  
  <p>I installed phantomjs in C directory and highcharts-convert.js in the same directory as HighStock. In C# I am starting a process to execute phnatom JS. This is the code:</p>
  
  <pre><code>Process process = new Process();
  process.StartInfo.WorkingDirectory = "C:\\Phantom JS\\phantomjs-1.9.7-windows";
  process.StartInfo.FileName = "phantomjs.exe";
  process.StartInfo.CreateNoWindow = true;
  process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;          
  process.StartInfo.Arguments = "phantomjs highcharts-convert.js -infile options.js -outfile chart-output.png -scale 2.5 -width 300";          
  process.Start();   
  </code></pre>
  
  <p>These are the contents of options.js (copied from highcharts example)</p>
  
  <pre><code>{
      infile: {
              xAxis: {
                  categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
              }
          series: [
              {
                  data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
              }]
      }
  }
  </code></pre>
  
  <p>The process runs but there is no output-chart being generated. How can I find if output chart is generated and if yes then where is it located?</p>