How to select all components in a slide (like doing it with the gui) using the cli or macros. I need to automate this task

Hello, I need to open several pptxs files to convert them to png. I am using the libreoffice API and it is working. However, there are some components outside of the border of the slide that I want to be included in the png. For example, when I use the gui I can go to File, select all and later export the selection. How can I achieve this using the cli (I search and I think that the cli doesn’t have this option), or do I have to use macros?

Best regards,

Aracely