We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

Error Occured when Adding an Image on a Presentation Slide in Node.js

I am trying to add an image with the Node.js SDK following the example here: https://docs.aspose.cloud/slides/adding-a-picture-to-a-presentation-slide/.

However, when I hit the endpoint, I get an internal error saying index is out of range. This doesn’t seem like a valid error because I know the index I am passing is correct.

My PPT file has 13 slides, and when I pass 0, this is the response:
Screenshot 2023-06-09 at 3.36.33 PM.png (183.3 KB)

When I try with any number between 1 and 13, it returns this:
Screenshot 2023-06-09 at 3.37.28 PM.png (208.6 KB)

Is this some bug that has not been caught, or am I doing something wrong here?

Thank you for posting the question.

When you use Aspose.Slides Cloud API, the index of many objects (slides, shapes, etc.) begins from 1. So, if your presentation file contains 13 slides, the slide index can be specified from 1 to 13. Please check your results carefully again. If the issue persists, please share the presentation file and code example that reproduces the error.

Hi @andrey.potapov, thanks for the quick response. Yes, as I mentioned originally, I still get an error when passing a value between 1 to 13. Please let me know if there’s anything else I can check, thanks.

Unfortunately, I was unable to reproduce the error you are encountering. Please describe in more detail how to get the same error message.