问题
I have many PowerPoint presentations that I need to be able to add to the res folder in my app. They will take up a lot of memory if I do not save them as XML, PDF, or XPS. PDF and android do not come together very easily at all so I choose the path of XML or XPS. I need these to be able to be viewed and/or then edited as a bitmap.
I do not understand how a PowerPoint XML is able/implemented to be viewed or drawn onto the screen. I also do not understand how I would do the same with PowerPoint XPS, but only one method(XPS or XML) is needed. I do know that PDF has slowly become not an option as to the complexity of the file and that there are no standard viewer API's.
So basically...
- I need to display/view a XML or XPS PP presentation as a bitmap on android
- I can use XML and Java
- I have done research but I still need to understand the underlying factors that go into do this implementation
I would attach code below but the size is too large for Stack Overflow. I would recommend testing with PP and save as PowerPoint XML format if you need to.
Thank you so much for your help.
回答1:
I don't think there is going to be an easy way on Android for you to parse the BinaryData that is present in a powerpoint XML file.
I think you'd be better off saving your pp slides as images, that way you already have them in something that is easy to make into a Bitmap object and edit as you wish.
回答2:
Try the HSLFSlideShow module on Apache.org. The module promises the ability to parse a PPT file, get the embedded objects, pictures, etc. It might help.
来源:https://stackoverflow.com/questions/11002474/view-powerpoint-xml-in-android-as-a-bitmap-or-jpeg-or-png-image