How can we download PDF file to local drive in Lightning instead of storing in SF? On click of a button, PDF should be downloaded. The button click will initiate an API call (REST) and the response can either be a Base64 encoded string or a blob.
I am aware of the options on how we can handle the content in SF based on the response received. Either we can use EncodingUtil.base64Decode() or resp.getBodyAsBlob() methods to handle the response and convert to PDF in Salesforce.
Could anyone suggest how to download the same PDF file directly to system instead of storing in Salesforce.