I wasn’t trying to embed a PDF, I got that part wrong, so finally I fixed this code, now i’m able to display my dynamic PDF inside the fancybox. Here’s the code:
$(document).ready(function () {
$(“.pdf”).fancybox({
type: ‘iframe’,
width: 800,
height: 1000,
fitToView: false,
autoSize: false,
iframe : {
preload: false
}
});
}); // ready
And my PHP code was corrected as well:
echo “
Issue# “.$filename.”
“;
I found a little issue trying to open this on IE & Chrome, so this line of code saved my life:
iframe : {
preload: false
}
I leave it here so anybody can use it, cheers!