Hi,
I have a .ppt presentation with just one paragraph which contains hyperlinked text. The hyperlink targets to slide #1. When I try to get hyperlink’s action type, I get HyperlinkActionType.NoAction instead of HyperlinkActionType.JumpSpecificSlide.
Here’s the code I use:
public void testPpt() throws Exception {
String presentationPath = “HyperlinksInternalTest.ppt”;
InputStream inputStream = new FileInputStream(presentationPath);
Presentation presentation = new Presentation(inputStream);
inputStream.close();
ISlide slide = presentation.getSlides().get_Item(0);
IAutoShape shape = (IAutoShape) slide.getShapes().get_Item(0);
IParagraph paragraph = shape.getTextFrame().getParagraphs().get_Item(0);
IPortion portion = paragraph.getPortions().get_Item(0);
System.out.println(portion.getText());
IHyperlink hyperlink = portion.createPortionFormatEffective().getHyperlinkClick();
System.out.println(hyperlink.getTargetSlide().getSlideNumber());
System.out.println(hyperlink.getActionType());
}
Here’s the output:
hyperlink to specific slide
1
0
I’m using Aspose.Slides for Java 16.9.0.
Can you check this?
Can you check this?
Thanks,
Zeljko