I've got this page called pdf.php:
<?php
$im = new imagick( 'uploadedfiles/logo.pdf[0]' );
$im->setImageFormat( "png" );
header( "Content-Type: image/png" );
echo $im;
?>
Then I've got script that echos this:
$pdf_ext = '<div class="aList" style="cursor:pointer; width:100%; clear:both; overflow:hidden; height:auto; margin-bottom:5px;" id="pdf.php"><div style="float:left; margin:0 5px 0 0; padding:0 5px; width:auto;height:20px;border:2px solid black;">' . $ext . '</div>' . $a_name . '</div>';
This is what's displayed when I click on div.aList:
<div id="aPreview"><img /></div>
And in background jquery script after clicking on div.aList does this:
// Element ID is send via $(".aList").live("click") event
function showPreview(elementId) {
$("#aPreview img").attr('src',elementId);
$("#aPreview").fadeIn('slow');
$("body").click(function() {
$("#aPreview").fadeOut('slow');
});
}
But it doesn't show the image, what might be wrong?