I wrote code that in embed downloads a PDF file in base64 format. If we say a file is 150 kilobytes, then it is displayed without problems, and 2 megabytes is no longer displayed or hangs the page. Maybe this is due to some kind of restriction?
This is how I output a PDF file (javascript):
function printPdfFile(data){ var widthImage = 1024; var heightImage = 768; var newWin = open('','Печать файла','width='+ widthImage +',height='+ heightImage + ',status=no,toolbar=no,menubar=no,location=no,scrollbar=0,resizable=yes'); newWin.document.writeln('<html><head></head><body><embed name="plugin" src="data:application/pdf;base64,' + data + '" id="pdfDocument" width="100%" height="100%"></embed></ body></html>'); newWin.document.close(); newWin.focus(); }