잉크
Contents
[
Hide
]
기존 잉크 모양에 접근하고 이를 제거하는 예제를 Aspose.Slides for PHP via Java를 사용하여 제공합니다.
❗ Note: 잉크 모양은 특수 장치에서 사용자가 입력한 데이터를 나타냅니다. Aspose.Slides는 프로그래밍 방식으로 새로운 잉크 스트로크를 생성할 수 없지만, 기존 잉크를 읽고 수정할 수 있습니다.
잉크 액세스
슬라이드에서 첫 번째 잉크 모양을 가져옵니다.
function accessInk() {
$presentation = new Presentation("ink.pptx");
try {
$slide = $presentation->getSlides()->get_Item(0);
// 슬라이드에서 첫 번째 잉크 모양에 접근합니다.
$firstInk = null;
$shapeCount = java_values($slide->getShapes()->size());
for ($index = 0; $index < $shapeCount; $index++) {
$shape = $slide->getShapes()->get_Item($index);
if (java_instanceof($shape, new JavaClass("com.aspose.slides.Ink"))) {
$firstInk = $shape;
break;
}
}
} finally {
$presentation->dispose();
}
}
잉크 제거
슬라이드에서 잉크 모양을 삭제합니다.
function removeInk() {
$presentation = new Presentation("ink.pptx");
try {
$slide = $presentation->getSlides()->get_Item(0);
// 슬라이드의 첫 번째 모양이 잉크 모양이라고 가정합니다.
$ink = $slide->getShapes()->get_Item(0);
$slide->getShapes()->remove($ink);
$presentation->save("ink_removed.pptx", SaveFormat::Pptx);
} finally {
$presentation->dispose();
}
}