After some search, the answer is changing the Content-Dispotition from the response header of the PDF url from 'attachment' to 'inline'.