Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get the connector_type of a Connector #1006

Open
Force1ess opened this issue Aug 21, 2024 · 0 comments
Open

how to get the connector_type of a Connector #1006

Force1ess opened this issue Aug 21, 2024 · 0 comments

Comments

@Force1ess
Copy link

Hi, I'm trying to reproduce shapes in a PPTX file, but I'm encountering an issue with connectors.

Specifically, it seems that the connector type is defined within an XML tag, as shown in the src/pptx/oxml/shapes/connector.py: 64 file:

f'    <a:prstGeom prst="{prst}">\n'

However, in the actual slide XML for a connector, the XML structure looks like this:

self._element.spPr.prstGeom.xml

'<a:prstGeom xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" prst="straightConnector1">\n  <a:avLst/>\n</a:prstGeom>\n'

It appears that the prst attribute in the a:prstGeom tag is crucial for defining the connector type.

This issue seems related to #749, where shape.element.spPr.prstGeom.xml.prst is also causing similar problems.

Could you provide guidance on how to correctly handle this connector type in the XML, or if there's a workaround for this issue?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant