1
I have an application that generates a PDF in bytes and converts it to ToBase64String
and sends astravés of a JSON
for javascript to open, but on Chrome it cannot read this file and present the PDF
$.post('/RelatoriosGerais/GerarPDF/', { CategoriaRelatorio: 1 }, function (data) {
if (data.status = true) {
let Pdf = 'data:application/pdf;base64,' + data.arrayByte;
window.open(Pdf, '_blank');
}
whereas data.arrayByte
is base 64 which is returned via JSON
NOTE: Firefox works
I know the question is old, but I believe that Uri Scheme date has limit, that varies between browsers, in this case it seems to me that Blob could be better, because the limit is higher, ooutra output would simply record in real files.
– Guilherme Nascimento