crabbly / Print.js

A tiny javascript library to help printing from the web.
MIT License
4.32k stars 673 forks source link

Erro Out of Memory, print PDF #656

Open gpado opened 1 year ago

gpado commented 1 year ago
      setTimeout(() => {            
        printJS({
          printable: id,
          type: 'pdf',
          base64: true,
          showModal: true,
          onPdfOpen: true, 
          fallbackPrintable: () => console.log("FallbackPrintable"),      
          onPrintDialogClose: () => console.log('The print dialog was closed'),
          onError: function  (error) {
            alert('Error found => ' + error.message)
          }
        });
        console.log("TimeOut Executado");
        }, 3000)

When the file is too big it gives an error in the browser, Erro Out of Memory. example: 120mb.

When I do with smaller files it works perfectly.