@cloudformatter template

A simple starting template for @cloudformatter testing

HTML

<script src="http://www.cloudformatter.com/Resources/Pages/CSS2Pdf/Script/xepOnline.jqPlugin.js"></script>
<script src="https://www.google.com/jsapi?autoload={&#39;modules&#39;:[{&#39;name&#39;:&#39;visualization&#39;,&#39;version&#39;:&#39;1.1&#39;,&#39;packages&#39;:[&#39;bar&#39;]}]}"></script>
<div id="buttons" class="buttons"></div>
<hr/>
<div id="JSFiddle">
    <div id="chart_div" style="width: 1100px; height: 500px;"></div>
</div>

CSS

.buttons button:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.buttons button:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

button {
    color:#111;
    background-image: linear-gradient(to bottom,#ffffff 0,#777777 100%);
    background-repeat: repeat-x;
    padding: 5px 10px;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
    border-width:1px;
    border-color: #777;
    text-shadow: 0 -1px 0 rgba(0,0,0,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);
}
button:hover{
    color:#fff;
    background-image: linear-gradient(to top,#337ab7 0,#265a88 100%);
}

JavaScript

google.setOnLoadCallback(drawChart);
<!-- This adds the proper namespace on the generated SVG -->
function AddNamespaceHandler(){
  var svg = jQuery('#chart_div svg');
  svg.attr("xmlns", "http://www.w3.org/2000/svg");
  svg.css('overflow','visible');
}
<!-- This generates the google chart -->
function drawChart() {
var data = google.visualization.arrayToDataTable([
    ['City', '2010 Population', '2000 Population'],
    ['New York City, NY', 8175000, 8008000],
    ['Los Angeles, CA', 3792000, 3694000],
    ['Chicago, IL', 2695000, 2896000],
    ['Houston, TX', 2099000, 1953000],
    ['Philadelphia, PA', 1526000, 1517000]
]);

    var options = {
        chart: {
            title: 'Population of Largest U.S. Cities',
            subtitle: 'Based on most recent and previous census data'
        },
        hAxis: {
            title: 'Total Population',
            minValue: 0,
        },
        vAxis: {
            title: 'City'
        },
        bars: 'horizontal'
    };
    var chart = new google.charts.Bar(document.getElementById('chart_div'));
    <!-- Add the event handler which adds the proper namespace on the SVG -->
    google.visualization.events.addListener(chart, 'ready', AddNamespaceHandler); 
    chart.draw(data, options);
}

<!-- @cloudformatter calls to render the SVG -->
    
<!-- Convert the SVG to PDF and download it -->
var click="return xepOnline.Formatter.Format('JSFiddle', {render:'download', srctype:'svg'})";
jQuery('#buttons').append('<button onclick="'+ click +'">PDF</button>');
<!-- Convert the SVG to PNG@120dpi and open it -->
click="return xepOnline.Formatter.Format('JSFiddle', {render:'newwin', mimeType:'image/png', resolution:'120', srctype:'svg'})";
jQuery('#buttons').append('<button onclick="'+ click +'">PNG @120dpi</button>');
<!-- Convert the SVG to JPG@300dpi and open it -->
click="return xepOnline.Formatter.Format('JSFiddle', {render:'newwin', mimeType:'image/jpg', resolution:'300',...