I extend a couple of Confluence Events in my plugin to create custom PDFs using the build-in PDF engine.
To create a PDF via FlyingSaucerPdfExporterService.createPdfForPage(user, page, contextpath) I need a user though I dont really know which one...
I guess it should be the curren user that is responsible for the event or maybe the admin. Sadly I coldnt find any documentation on what user FlyingSaucer expects or even how to get the current user of the Confluence Event.
Can anybody here point me in the right direction?
Community moderators have prevented the ability to post new answers.
You can probably try this:
Page newPage = event.getPage(); final User user = userAccessor.getUser(newPage.getCreatorName());
Gives you the user who created the page.
There is something else that stops my plugin from working (https://answers.atlassian.com/questions/141213/how-can-i-create-a-pdf-in-my-own-plugin)but I am pretty sure the User is the correct one.
Thanks a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.