Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
PowerPoint.SlideGetImageOptions interface
- Package:
- powerpoint
Represents the available options when getting an image of a slide.
Remarks
Used by
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/export-import-slide.yaml
// Exports current slide.
await PowerPoint.run(async (context) => {
const slide = context.presentation.getSelectedSlides().getItemAt(0);
const slideBase64DataResult = slide.exportAsBase64();
const imageBase64DataResult = slide.getImageAsBase64({ height: 300 });
await context.sync();
localStorage.setItem("exportedSlide", slideBase64DataResult.value);
localStorage.setItem("exportedSlideImage", imageBase64DataResult.value);
updateSlideImage(imageBase64DataResult.value);
console.log("Slide was exported.");
});
Properties
| height | The desired height of the resulting image in pixels. |
| width | The desired width of the resulting image in pixels. |
Property Details
height
The desired height of the resulting image in pixels.
height?: number;
Property Value
number
Remarks
width
The desired width of the resulting image in pixels.
width?: number;
Property Value
number
Remarks
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins
Feedback
Was this page helpful?
