I am trying to get a PDF that I have in an attachment object saved out to disk.
I am using something like this:
blobFile = results.models.PackingSlip.data[0].Body;
var bf = new Blob([results.models.PackingSlip.data[“0”].Body.realBlobValue.asByteArray ], {type : “application/pdf”});
saveAs(bf, “packingSlip.pdf”);
this is what the Body of the Attachement looks like from the Model. So skuid is retrieving the Attachment PDF correctly.
The PDF is downloaded correctly, however, when I go and view it. I get this:
So my question is:
How do I properly get the Blob from the object above so that its an actual PDF?
Thanks in advance.