I got it to work! The problem was that I was using $.post in jQuery to sent the data to de PDF template. Since $.post doesn't actually goes to the page i added an extra event to load the page. But by doing this i emptied the $POST session... stupid.
What i'm doing now is first creating a form and setting the img as value and then submitting the form.
$("body").append($("<form></form>").attr({ "action": PDFurl, "method": "post", "id" : "postForm" })
.append($('<input>').attr({ "type": "hidden", "name": "img", "value": imgChart.prop("outerHTML") }))
).find("#postForm").submit();