Add footer to PPT file document object using java action

0
Hello  ,  I have one PPT filedocument object in mendix, I'm creating java action to add footer to that PPT file and commit back to db. But I'm not getting how to read that PPT filedocument as file in javaaction. I have one method in java LoadFromFile("filepathFromLocalRepository") which will load ppt file and add footer to that file. But in my case I have PPT fileDocument mendix object(parameter to java action), so can anyone suggest me how I can use mendix PPT fileDocument object to LoadFromFile method or any other way to achieve my functionality to add footer to PPT File in mendix?
asked
2 answers
2

You would normally use getFileDocumentContent to access the contents of a Mendix FileDocument. This will return an InputStream. Does your Java library accept an InputSteam?

If you need to save back to a FileDocument, have a look at the storeFileDocumentContent method.

https://apidocs.rnd.mendix.com/9/runtime/com/mendix/core/Core.html#getFileDocumentContent(com.mendix.systemwideinterfaces.core.IContext,com.mendix.systemwideinterfaces.core.IMendixObject)
https://apidocs.rnd.mendix.com/9/runtime/com/mendix/core/Core.html#storeFileDocumentContent(com.mendix.systemwideinterfaces.core.IContext,com.mendix.systemwideinterfaces.core.IMendixObject,java.io.InputStream)

Good luck!

answered
1

Hi Vaishnavi,

Create a java action with your PPT file document type as input parameter. Use same entity type as output value also.
Deploy project for eclipse and add custom java logic to add footer in your PPT file document. Return the changed filedocument object in java action.
Check documentation below,
https://apidocs.rnd.mendix.com/7/runtime/com/mendix/systemwideinterfaces/core/IMendixObject.html

 

answered