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(); } 

  • show how you download pdf (your code), and also does it manifest itself only in a specific browser or in all? - Alex
  • @Alex added to the question, on firefox this problem exists for all users. on other browsers did not check - perfect

0