PresentationBuilder cannot copy video slides correctly

Home Forums PresentationML PresentationBuilder cannot copy video slides correctly

This topic contains 7 replies, has 3 voices, and was last updated by  sliu 9 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #2512

    Eric White
    Keymaster

    This certainly sounds like a bug. I’ll attend to this in the next week or so. Should not be hard to fix.

    #2516

    sliu
    Participant

    Hi Eric,

    That would be great! I’m new on OpenXml SDK. I’m reading PowerTool code. I see PtOpenXmlExtensions.GetXDocument and PutXDocument use OpenXmlPart.Annotation<XDocument> method to store part xml. I don’t fully understand its purpose. If all the parts have their annotations with different types, when the presentation is saved to pptx, can I see the annotations? Do they affect pptx rendering?

    Thanks very much!!!

    #2525

    Eric White
    Keymaster

    GetXDocument and PutXDocument are convenience functions that make it easier to work with LINQ to XML using the Open-Xml-Sdk. You can call GetXDocument multiple times and it will de-serialize it only once. The annotations are on the Open XML parts within a package. You can think of annotations as strongly-typed ‘user data’ for a part within a package.

    Annotations are in-memory only. They have no affect on rendering.

    #2529

    sliu
    Participant

    Thanks for the explanation.

    After reading the code, I realized all the media files are created as DataPart in PresentationBuilder and the Non-Public memember TargetFileExtension is “.bin”. For images, OpenXml SDK adds .bin to media files. For audio and video files, it doesn’t add any extension. I know audios created by OpenXml SDK are playable, but not video. I’m not sure if it is caused by file extension. I thought using OpenXm SDK I can create exactly folder layouts as pptx generated by PowerPoint. It seems like not exactly.

    I’m wondering how [Content_Type].xml is created by sdk. Which sdk api or part is related to its generation? Can I load in this xml and modify it and save it back to some part. When package is saved, my modified content is in [Content_Type].xml?

    #2531

    Eric White
    Keymaster

    No, you can’t create folder layout exactly as generated by PowerPoint. But it should not matter.

    [Content_Type].xml is created implicitly by System.IO.Packaging when you create a package. When you maintain a package, adding parts, you specify the content type, and System.IO.Packaging will add new entries into [Content_Type].xml. You should never need to maintain this explicitly.

    #3495

    tika01
    Participant

    PresentationBuilder cannot copy video slides correctly, could you plz help us.

    #3496

    sliu
    Participant

    This issue has been resolved. How do I help?

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.