Exporting xWiki Pages regulary by Script to PDF

Hi,

is there a possibility to export regularly a set of Wiki Pages to PDF? (by a bash oder powershell script)? I can see the rest interface which cannot export to pdf, In the Gui i can trigger the export by a url (but if i try to call the URL from a script it does not work (i guess that i cannot pass the auth through scipt to the main ui). Is there any possibility to do this? - A export Job within xwiki that runs once a month would be also suitable, but i dont know how to realize this.

Ernst

Hi, yes there is see Scheduler Application (XWiki.org)

I already sq that it might be possible in the scheduler - but unfortainly i couldnt find the function or object to export to pdf

One solution is to write groovy code as a scheduler job and do something similar as what is done when you export from the UI:

https://github.com/xwiki/xwiki-platform/blob/915151bfbef24ce136149da24c5102bae2e82d37/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ExportAction.java#L161-L194

This isn’t going to be very easy.

We need to expose this through a Script Service as that would make it trivial to use.

Feel free to create a jira issue for it.