Skip to main content
Participant
November 25, 2021
Question

pdf dans balise object que les liens URL s'ouvre dans un nouvel onglet

  • November 25, 2021
  • 1 reply
  • 2618 views

Bonjour

J'ai un pdf intreractif embarqué dans une balise 'object'.

Quand on est en ligne, les liens URL s'ouvre sur le même onglet que le pdf.

Étant dans une balise 'object' je ne peut pas utiliser 'target:_blank.'

J'ai trouvé une astuce par du code dans la fenêtre javascript d'acrobat pro pour forçer l'ouverture des liens (url) dans un nouvel onglet. Malheureusement, cela ne fonctionne pas sur tous les navigateurs.

Auriez-vous une solution dans acrobat pour cela ? ou une autre solution ?

Pour info mon pdf interactif a été généré depuis inDesign.

Merci 🙂

 

Hello

I have an interactive pdf embedded in an 'object' tag.

When you are online, the URL links open on the same tab as the pdf.

Being in an 'object' tag I cannot use 'target: _blank'.

I found a trick by some code in the javascript window of acrobat pro to force the opening of the links (url) in a new tab. Unfortunately, this does not work on all browsers.

Would you have a solution in acrobat for this? or another solution?

FYI my interactive pdf was generated from inDesign.

Thank you 🙂
This topic has been closed for replies.

1 reply

JR Boulay
Community Expert
Community Expert
November 25, 2021

Bonjour

 

J'ai trouvé ça dans un forum il y a longtemps mais je ne l'ai jamais testé ni utilisé :

 

Calling a hyperlink in a new window.

Although Acrobat doesn't have a link code that will force a Weblink to open in a new window, here's how you can make it happen without worrying whether your users have selected "Open Cross-Doc Links In Same Window."

Rather than linking directly to the URL you want to open, create a link to an HTML document that contains no text. The HTML document immediately opens a new window itself, using HTML code rather than Acrobat's syntax, and opens the desired URL in that window.

The Acrobat Weblink will be a normal link to an HTML page that has nothing in its body and includes the following line in its head:

< META HTTP-EQUIV="Refresh" CONTENT="x; URL=zzz" >

For x, substitute the number of seconds that should elapse before the new link opens (in this case, probably zero), and for zzz, substitute the URL that should open in the new window.

Acrobate du PDF, InDesigner et Photoshopographe
Participant
December 3, 2021

merci beaucoup pour votre retour

J'ai testé.

Il faut obligé la page html ouverte en lien à se fermer et revenir sur la page "principale"