3 Replies Latest reply on Apr 13, 2017 9:36 AM by Joel_Geraci

    util.stringFromStream out of memory large PDF


      I have a 180mb PDF which I am trying to pull the base64 data from. This method works for other PDFs but on this one I get an out of memory error during util.stringFromStream. Is there a way to stream this instead of pulling all at once? I eventually need to send this data out via hostContainer.postMessage. Here is the code.


      var documentStream = Collab.documentToStream(this);

      var encodedStream = Net.streamEncode(documentStream,"base64");

      var utfencodedStream = util.stringFromStream(encodedStream);  <- this line causes the error for large PDF