You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Removing slide doesn't remove the slide's relationships from [Content_Types].xml.
That is, calling removeSlide to remove slide 2 does delete the following from [Content_Types].xml.
From my naive diagnosis, calling removeSlide calls the factory removeSlide.
removeSlide(slide) {
this.powerPointFactory.removeSlide(slide.name);
The factory removeSlide calls removeContentType(partName)
factories/index.js:
removeSlide(slideName) { ...
this.contentTypeFactory.removeContentType(/ppt/slides/${slideName}.xml);
However, removeContentType is defined with two parameters partName and contentType.
So the contentType never matches and the slides' relationship in ContentType.xml is not removed.
Adding a default parameter was a (hack) solution for me.
node-pptx/lib/factories/content-types.js:
removeContentType(partName, contentType = "application/vnd.openxmlformats-officedocument.presentationml.slide+xml")
Time poor newbie reporting an issue - just trying to help. Apologies in advance for any inappropriateness in this issue report.
The text was updated successfully, but these errors were encountered:
Removing slide doesn't remove the slide's relationships from [Content_Types].xml.
That is, calling removeSlide to remove slide 2 does delete the following from [Content_Types].xml.
From my naive diagnosis, calling removeSlide calls the factory removeSlide.
removeSlide(slide) {
this.powerPointFactory.removeSlide(slide.name);
The factory removeSlide calls removeContentType(partName)
factories/index.js:
removeSlide(slideName) { ...
this.contentTypeFactory.removeContentType(
/ppt/slides/${slideName}.xml
);However, removeContentType is defined with two parameters partName and contentType.
So the contentType never matches and the slides' relationship in ContentType.xml is not removed.
Adding a default parameter was a (hack) solution for me.
node-pptx/lib/factories/content-types.js:
removeContentType(partName, contentType = "application/vnd.openxmlformats-officedocument.presentationml.slide+xml")
Time poor newbie reporting an issue - just trying to help. Apologies in advance for any inappropriateness in this issue report.
The text was updated successfully, but these errors were encountered: