scanny / python-pptx

Create Open XML PowerPoint documents in Python
MIT License
2.26k stars 499 forks source link

is there a way to "hide" information within slides? #894

Closed nnako closed 8 months ago

nnako commented 1 year ago

Hi,

in an application using python-pptx, I want to store information which is not relevant for the presentation user but relevant for an additional tooling. that tooling is to read-in the presentation file and gather that information which is "hidden" from the user.

Currently, I use the hyperlink attribute of a specific pptx element to store those "internal values" which are later read-out by another tooling. For example I store the value "ID_12345678" within an image shape, located as <slide>.<shape>.click_action.hyperlink.address.

There are two major drawbacks when using the element's hyperlink in such a way:

Is there a way to store (and later read out) element-specific but "internal" information within a pptx file using python-pptx, so that a presentation user might not be confused and the hyperlink functionality might still be used for hyperlinking?

scanny commented 8 months ago

I think you'll need to do your own research here and see what PowerPoint supports for this and perhaps what other folks have worked out.

It will vary based on what object(s) you want to annotate, like slide, shape, presentation, etc.

Rough ideas might be: