I have the following problem, I need to generate an html with a pdf embedded inside an embed, the interesting thing is that with files smaller than 6MB there is no problem but when the file is bigger it fails and only a white screen appears.
How do I make the bigger file appear like the smaller one?
I accept all kinds of suggestions.
Thank you very much in advance.
$src = urldecode($_REQUEST['archivo']);
//$src <-- string 'Z:/327000360.pdf'
ini_set('memory_limit', '256M');
$dataBase64 = base64_encode(file_get_contents($src));
$html = "<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<title>Visor de PDF</title>
<style>
html,body{
margin: 0;
padding: 0;
}
embed{
height: 99vh;
}
</style>
</head>
<body>
<embed src='data:application/pdf;base64,$dataBase64' width='100%' type='application/pdf'>
</body>
</html>";
echo $html;