Browse our Products

Aspose.Slides for PHP via Java 24.3 Release Notes

KeySummaryCategory
SLIDESPHP-47Use Aspose.Slides for Java 24.3 featuresEnhancement

Public API Changes

IHyperlink.ExternalUrlOriginal.property added

Added a new property IHyperlink.ExternalUrlOriginal, which represents a hyperlink that is set for this portion without regard to the actual content of the portion.

PowerPoint behaves specifically for links and their corresponding text in a portion. It allows to create text for the hyperlink in the form of a valid URL, different from the real address of the link. In this case, when you view the link in the edit window, it will be changed to match the text portion. This property represents the original value of the hyperlink.

How the original link is lost:

How the original link is lost:

Example:

$presentation = new Presentation("pres.pptx");

$portion = $presentation->getSlides()->get_Item(0)->getShapes()->get_Item(1)->getTextFrame()->getParagraphs()->get_Item(0)->getPortions()->get_Item(0);

$externalUrl = $portion->getPortionFormat()->getHyperlinkClick()->getExternalUrl(); // fake
$externalUrlOriginal = $portion->getPortionFormat()->getHyperlinkClick()->getExternalUrlOriginal(); // real

echo $externalUrl . "\n";
echo $externalUrlOriginal . "\n";