Skip to content Skip to sidebar Skip to footer

How To Open Links In New Window Which Is In Pdf Created By Tcpdf

I have tried target='_blank' but nothing happens. Is anybody help for this issue? I need to open links in new tab/window which is in PDF file. I'm using TCPDF 5.9.176

Solution 1:

Try using javascript:

<scripttype="text/javascript">functionabrirVentana(url) {
window.open(url, "nuevo");
}
</script>

and then the HTML:

<ahref="#"onClick="abrirVentana('http://')"></a>

Solution 2:

Another way would be this:

<scripttype="text/javascript">function openExternal(){
if(!document.getElementsByTagName) return;
var anchors = document.getElementsByTagName(’a');
for(var i = 0; i < anchors.length; i++){
    var thisAnchor = anchors[i];
    if(thisAnchor.getAttribute(’href’) && thisAnchor.getAttribute(’rel’) == ‘external’){
        thisAnchor.target = ‘_blank’;
    }
 }
}

window.onload = openExternal;
</script><ahref="http://"rel=”external”></a>

Post a Comment for "How To Open Links In New Window Which Is In Pdf Created By Tcpdf"