You have unwanted chars before <?
. remove all blank lines and spaces before <?
your image is otherwise correct.
<?
must be the first character first line in your script. you can avoid ?>
if you use it it must be the last line last chars.
solved converting html to image not working [closed]