Free Support Forum - aspose.com

Internal hyperlinks

Hi,


We are using Aspose Slides for Java version 2.6.0.2.
I am trying to get the internal hyperlinks to slides present in the third slide of link1.ppt. If I do it with the attached sample LinkSlide.java file, it is returning the proper internal HyperLink value.
If I load a ppt with action buttons (shapes.ppt) in a slide and load my link1.ppt, the internal HyperLink values could not be retrieved. It is returing -1 instead.
The zip containing the above 3 files is attached.
Please suggest a proper solution for the above problem.

Thanks,
Mani.
(Zoho Corp).

Hi Mani,


I have observed the two presentations shared by you. If you observe that in “shapes.ppt” the internal hyperlink is associated with shape it self rather than Textframe as it is in “link1.ppt” shapes. I have modified one of your methods to get internal hyperlinks and it worked for me using Aspose.Slides for Java 2.7.0. You may try the version that you are using as well.

public void processShape(Shape shape)
{
Link shapeLink=shape.getLink();
if(shapeLink!=null)
{
int actionType = shapeLink.getActionType();
int jumpType = shapeLink.getJumpType();
int internalLink = shapeLink.getInternalHyperlink();

int begin = shapeLink.getBegin();
int end = shapeLink.getEnd();
String extLink = shapeLink.getExternalHyperlink();
int pgNo = shapeLink.getPageNumber();

System.out.println(">>>>>>>>>> @@@@@@@@@@@@@ The actype " + actionType + " begin " + begin + " end " + end + " extLink " + extLink + " jumpType " + jumpType + " internal link id " + internalLink + " pgNo " + pgNo+ " and TextFrame: “);
}
else
{
Links links = getLinks(shape);
if(links != null) {
int linksSize = links.size();
for(int count = 0; count < linksSize; count++)
{
Link link = links.get(count);
int actionType = link.getActionType();
int jumpType = link.getJumpType();
int internalLink = link.getInternalHyperlink();

int begin = link.getBegin();
int end = link.getEnd();
String extLink = link.getExternalHyperlink();
int pgNo = link.getPageNumber();

System.out.println(”>>>>>>>>>> @@@@@@@@@@@@@ The actype " + actionType + " begin " + begin + " end " + end + " extLink " + extLink + " jumpType " + jumpType + " internal link id " + internalLink + " pgNo " + pgNo+ " and TextFrame: ");

}
}
}
}

Many Thanks,

Hi Mudassir,


Thanks for the quick response. I have tried with Aspose Slides for Java 2.7.0 version. The problem is not resolved.
Let me explain the problem in detail. The shapes.ppt will contain all the Auto Shapes used by us (as suggested in aspose forums to add an Auto Shape). So I load the shapes.ppt and get the byte array of shapes and store it in memory. After that I will load the link1.ppt. and get the links present in it. The external links and prev and next slide links info is got properly. But the link to internal slide is not got properly through the Link.getInternalHyperlink(). It is returning -1. If I load the link1.ppt first and then the shapes.ppt, it is parsing properly.
Please try with the below changes in the issueInternalHyperLinks() method.
Presentation preso = getPresentation(fileName);

if(args.length > 1) {
String shapesppt = args[1];
Presentation issue = getPresentation(shapesppt);
}

If the shapes.ppt is not loaded, then also the internal link in link1.ppt is parsed properly.

Please try with the attached src.zip and the LinkSlide.java in my previous attachment.

Hope this helps. If you need further info, please get back to me.

Thanks,
Mani.

Hi Mani,


I have worked with the code and scenario shared by you and have been able to observe this strange issue. An issue with ID 33087 has been created in our issue tracking system to further investigate and resolve this issue. This thread has been linked with the issue so that you may be automatically notified once the issue is resolved.

We are sorry for your inconvenience,

Hi Mudassir,


One more related issue. In the attached zip, a LinkSlide.java file is present to parse the hyperlinks in a ppt file. If I parse the shapes.ppt in the attached zip before parsing the link1.ppt in the attached zip (Usage : java LinkSlide shapes.ppt link1.ppt), then the external link is displayed as -1,-1,PREV. But if I load the link1.ppt alone (Usage : java LinkSlide link1.ppt), then the external link is an url pointing to youtube, which is the expected behavior.

Please give us a fix for the above 2 link related issues at the earliest. Please get back to me for any further info regarding this.

Thanks,
Mani.
(Zoho Corp.)

Hi Mani,


I have worked with the presentation files shared by you and have been able to observe the issue. An issue with ID SLIDESJAVA-33285 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

The issues you have found earlier (filed as SLIDESJAVA-33285) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as SLIDESJAVA-33087) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.