anchor.diff:  						yLabels.attr("y", yy + yShift);
   					};
   
  -					// alter diagram to have the desired output in the PDF
  -					alterDiagramForPdf(diagram);
  -
  -					// convert svg content to string
  -					var xmlSerializer = new XMLSerializer();
  -					var svgString = xmlSerializer.serializeToString(diagram.svg[0][0]);
  -
  -					// restore previous settings after generating xml string
  -					alterDiagramForPdf(diagram, true);
  -
  -					// temp hack for shifted axis values (see also loadSVG function in plots_tab.jsp)
  -//					svgString = svgString.replace(/<text y="9" x="0" dy=".71em"/g,
  -//						"<text y=\"19\" x=\"0\" dy=\".71em\"");
  -//					svgString = svgString.replace(/<text x="-9" y="0" dy=".32em"/g,
  -//						"<text x=\"-9\" y=\"3\" dy=\".32em\"");
  -
  -					// set actual value of the form element (svgelement)
  -					var form = mainView.$el.find(".svg-to-pdf-form");
  -					form.find('input[name="svgelement"]').val(svgString);
  -
  -					// submit form
  -					form.submit();
  +					// submit pdf form
  +					submitForm(alterDiagramForPdf, diagram, "svg-to-pdf-form");
   				});
   
   				// TODO draw mutation table
  
positive.code: 					console.log("Error initializing mutation diagram: %s", gene);
  					toolbar.hide();
  				}
  
  				// add listener to the pdf button
  				pdfButton.click(function (event) {
  
negative.code: 			<input type='hidden' name='filetype' value='pdf'>
  			<input type='hidden' name='filename' value='mutation_diagram_{{geneSymbol}}.pdf'>
  		</form>
  		<form style="display:inline-block"
  		      action='svgtopdf.do'
  		      method='post'
  		      class='svg-to-file-form'>
  			<input type='hidden' name='svgelement'>
  			<input type='hidden' name='filetype' value='svg'>
  			<input type='hidden' name='filename' value='mutation_diagram_{{geneSymbol}}.svg'>
  		</form>
  		<button class='diagram-to-pdf'>PDF</button>
  		<button class='diagram-to-svg'>SVG</button>
  	</div>
  	<div id='mutation_diagram_{{geneSymbol}}' class='mutation-diagram-container'></div>
  	<div id='mutation_table_{{geneSymbol}}' class='mutation-table-container'>
  