-1

I would like to open a pdf in my html page. I am using following sample php code for this

<?
         $a= base64_encode("test");
         $url=' <object  type="application/pdf" data="data:application/pdf;base64,'.$a.'" width="800" height="800">No Support  </object>';
         echo $url;
        ?>

When we are running this code, got error:

Failed to load PDF document

Am I missing anything this code?

Til
  • 5,150
  • 13
  • 26
  • 34

1 Answers1

0

visit this link how to display base64 encoded pdf? it's impossible to display a pdf with a base64 string.

Mr Arsal
  • 1
  • 1