open downloaded pdf from api in new tab javascript code example Example: javascript open pdf in new tab window.open("Here Download PDF url", '_blank');