Highlighted

Indesign 2020 : problem with hyperlinks

New Here ,
Apr 26, 2020

Copy link to clipboard

Copied

Salut,
J'utilise Indesign 2020. J'ai un problème avec les hyperliens car lorsque j'exporte au format PDF, ils ne fonctionnent pas. Il ne se passe rien.Exemple: lien hypertexte sur les mots Communauté Adobe.C'est la même chose quand je mets un hyperlien sur une image.Pouvez-vous m'aider ?Je vous remercieFrançois

Hi,

you can try this script,

 

var myDocument= app.activeDocument;
for(myCounter = 0; myCounter <myDocument.activeLayer.rectangles.length; myCounter++)
{

myStory =myDocument.activeLayer.rectangles.item(myCounter);
var image_family_id=myStory.associatedXMLElement.xmlAttributes.item("IMAGE_FILE").value;
var image_tagname=myStory.associatedXMLElement.markupTag.name;
image_tagname=image_tagname.concat("_link");

var image_family_id=myStory.associatedXMLElement.parent.parent.xmlAttributes.itemByName("family_id").value;
var tagcnt=myStory.associatedXMLElement.parent.parent.xmlElements.length;
var link_attribute_path= app.activeDocument.xmlElements[0].evaluateXPathExpression(".//product_family//specs_type//"+image_tagname);
for(var i=0;i<link_attribute_path.length;i++)
{
var link_path_famid= link_attribute_path[i].parent.parent.xmlAttributes.itemByName("family_id").value;
if(link_path_famid==image_family_id)
{
try
{
var linkval=link_attribute_path[i].xmlContent.contents;

myHyperlinkURL = app.activeDocument.hyperlinkURLDestinations.add(linkval);
myHyperlinkSource = app.activeDocument.hyperlinkPageItemSources.add(myStory);
myHyperlink= app.activeDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);
myHyperlink.visible=false;
}
catch(Exception)
{}

}
}

}
alert("Hyperlinks are created successfully for images.");

 

TOPICS
Feature request, Performance, Scripting

Views

400

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Indesign 2020 : problem with hyperlinks

New Here ,
Apr 26, 2020

Copy link to clipboard

Copied

Salut,
J'utilise Indesign 2020. J'ai un problème avec les hyperliens car lorsque j'exporte au format PDF, ils ne fonctionnent pas. Il ne se passe rien.Exemple: lien hypertexte sur les mots Communauté Adobe.C'est la même chose quand je mets un hyperlien sur une image.Pouvez-vous m'aider ?Je vous remercieFrançois

Hi,

you can try this script,

 

var myDocument= app.activeDocument;
for(myCounter = 0; myCounter <myDocument.activeLayer.rectangles.length; myCounter++)
{

myStory =myDocument.activeLayer.rectangles.item(myCounter);
var image_family_id=myStory.associatedXMLElement.xmlAttributes.item("IMAGE_FILE").value;
var image_tagname=myStory.associatedXMLElement.markupTag.name;
image_tagname=image_tagname.concat("_link");

var image_family_id=myStory.associatedXMLElement.parent.parent.xmlAttributes.itemByName("family_id").value;
var tagcnt=myStory.associatedXMLElement.parent.parent.xmlElements.length;
var link_attribute_path= app.activeDocument.xmlElements[0].evaluateXPathExpression(".//product_family//specs_type//"+image_tagname);
for(var i=0;i<link_attribute_path.length;i++)
{
var link_path_famid= link_attribute_path[i].parent.parent.xmlAttributes.itemByName("family_id").value;
if(link_path_famid==image_family_id)
{
try
{
var linkval=link_attribute_path[i].xmlContent.contents;

myHyperlinkURL = app.activeDocument.hyperlinkURLDestinations.add(linkval);
myHyperlinkSource = app.activeDocument.hyperlinkPageItemSources.add(myStory);
myHyperlink= app.activeDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);
myHyperlink.visible=false;
}
catch(Exception)
{}

}
}

}
alert("Hyperlinks are created successfully for images.");

 

TOPICS
Feature request, Performance, Scripting

Views

401

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 26, 2020 0
Explorer ,
May 07, 2020

Copy link to clipboard

Copied

Hi,

you can try this script,

 

var myDocument= app.activeDocument;
for(myCounter = 0; myCounter <myDocument.activeLayer.rectangles.length; myCounter++)
{

myStory =myDocument.activeLayer.rectangles.item(myCounter);
var image_family_id=myStory.associatedXMLElement.xmlAttributes.item("IMAGE_FILE").value;
var image_tagname=myStory.associatedXMLElement.markupTag.name;
image_tagname=image_tagname.concat("_link");

var image_family_id=myStory.associatedXMLElement.parent.parent.xmlAttributes.itemByName("family_id").value;
var tagcnt=myStory.associatedXMLElement.parent.parent.xmlElements.length;
var link_attribute_path= app.activeDocument.xmlElements[0].evaluateXPathExpression(".//product_family//specs_type//"+image_tagname);
for(var i=0;i<link_attribute_path.length;i++)
{
var link_path_famid= link_attribute_path[i].parent.parent.xmlAttributes.itemByName("family_id").value;
if(link_path_famid==image_family_id)
{
try
{
var linkval=link_attribute_path[i].xmlContent.contents;

myHyperlinkURL = app.activeDocument.hyperlinkURLDestinations.add(linkval);
myHyperlinkSource = app.activeDocument.hyperlinkPageItemSources.add(myStory);
myHyperlink= app.activeDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);
myHyperlink.visible=false;
}
catch(Exception)
{}

}
}

}
alert("Hyperlinks are created successfully for images.");

 

-Monisha

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2020 1
jmlevy LATEST
Adobe Community Professional ,
May 07, 2020

Copy link to clipboard

Copied

Bonjour,

Quel paramètre d'export utilises-tu ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
May 07, 2020 0