Browse our Products
Aspose.Slides for PHP via Java 22.10 Release Notes
Key | Summary | Category |
---|---|---|
SLIDESPHP-13 | Use Aspose.Slides for Java 22.10 features | Enhancement |
Public API Changes
ISVGOptions.UseFrameSize and ISVGOptions.UseFrameRotation have been added
New methods getUseFrameSize, setUseFrameSize, getUseFrameRotation and setUseFrameRotation have been added to the ISVGOptions interface and SVGOptions class.
The getUseFrameSize and setUseFrameSize methods determines whether the text frame will be included in a rendering area.
Methods declaration:
/**
* <p>
* Determines whether the text frame will be included in a rendering area or not.
* Read/write {@code boolean}.
* Default value is false.
* </p>
*/
public boolean getUseFrameSize();
/**
* <p>
* Determines whether the text frame will be included in a rendering area or not.
* Read/write {@code boolean}.
* Default value is false.
* </p>
*/
public void setUseFrameSize(boolean value);
The getUseFrameRotation and setUseFrameRotation methods determines whether to perform the specified rotation of the shape when rendering.
Methods declaration:
/**
* <p>
* Determines whether to perform the specified rotation of the shape when rendering or not.
* Read/write {@code boolean}.
* Default value is true.
* </p>
*/
public boolean getUseFrameRotation();
/**
* <p>
* Determines whether to perform the specified rotation of the shape when rendering or not.
* Read/write {@code boolean}.
* Default value is true.
* </p>
*/
public void setUseFrameRotation(boolean value);
The code snippet below demonstrates using these methods:
$pres = new Presentation("pres.pptx");
$svgOptions = new SVGOptions();
// Does not perform the specified rotation of the shape while rendering to SVG.
$svgOptions->setUseFrameRotation(false);
// Include the text frame in a rendering area while rendering to SVG.
$svgOptions->setUseFrameSize(true);
// Save shape to SVG
$stream = new Java("java.io.FileOutputStream", "output.svg");
$pres->getSlides()->get_Item(0)->getShapes()->get_Item(0)->writeAsSvg(java_values($stream), java_values($svgOptions));
$stream->close();
Embedded fonts compress feature has been added
Embedded fonts can be compressed to decrease the size of the presentation that contains such fonts. To provide this functionality, the Compress.compressEmbeddedFonts method has been added to LowCode API.
Below is the snippet demonstrating compression:
$pres = new Presentation("pres.pptx");
Compress::compressEmbeddedFonts($pres);
$pres->save("pres-out.pptx", SaveFormat::Pptx);
LeaderLinesColor have been added
The getLeaderLinesColor and setLeaderLinesColor methods have been addded to IDataLabelCollection interface and DataLabelCollection class, now the color of all leader lines in the collection can be changed:
$pres = new Presentation("pres.pptx");
$chart = $pres->getSlides()->get_Item(0)->getShapes()->get_Item(0);
$series = $chart->getChartData()->getSeries();
$labels = $series->get_Item(0)->getLabels();
$labels->setLeaderLinesColor(java_values(new Java("java.awt.Color"))->RED);
$pres->save("pres-out.pptx", SaveFormat::Pptx);