1

I am trying to open a PDF that I am getting from a response from a microservice. I am able to receive the PDF and set the parameters for it within the lightning component helper, and download it. However, it needs to be opened in another tab instead of downloaded.

Here is the code that is working to download the pdf but I want to be able to open up and view the pdf within response.getReturnValue in a new tab.

                    let a = document.createElement("a");
                    a.href =  response.getReturnValue();
                    a.download = "PDF " +  pdfAction.getParams().DocNumID;
                    a.click(); 

0

You must log in to answer this question.

Browse other questions tagged .